Communication Between BASIC and Assembly Language 113 Getting Information on Arguments When an ICALL is executed with an argument, and the corresponding parameter is blind, then it may be necessary for the purposes of your routine to know what type of argument is actually passed. This need can be present even when one of the explicit type declarations is used, since an expression or constant can be passed as easily as a variable. A utility has been provided for obtaining this information, along with other "vital statistics" which may be useful to know during the execution of your routine.
Before describing the utility itself, let's look at the information which it can provide you about an argument. The information returned by the utility is stored in an area which you set aside for it. The size of the area can vary from 3 words to 30. The information, when returned, is in the following form- Word # Description o Argument type (see description later) 2 Size, in number of bytes (dimensioned length, for strings) 1 Number of dimensions (O for non-arrays) (for arrays only:) 3 Total number of elements in arrayl 4 Lower bound of first dimension 1 5 Absolute size of first dimension (upper bound - lower + 1) 6 Lower bound of second dimension (if any)!
7 Absolute size of second dimension 8 Lower bound of third dimension (if any) 1 9 Absolute size of third dimension 10 Lower bound of fourth dimension (if any)! 11 Absolute size of fourth dimension 12 Lower bound of fifth dimension (if any) 1 13 Absolute size o'f fifth dimension 14 Lower bound of sixth dimension (if any)!
15 Absolute size of sixth dimension 16 Element offset 17 Size, in words, of each element (dimensioned length, for strings) (dependent upon memory size of your machine:) 18-20 Pointer parameters 21-23 Pointer parameters (only for machines over 64K bytes) 24-26 Pointer parameters (only for machines over 128K bytes) 27 -29 POinter/parameters (only for machines over 192K bytes) 1 Stored as a negative number.