hewlett-packard HP 9835A — 119

Communication Between BASIC and Assembly L;;}nguage 119 Here is an example call, retrieving the third element (relative element 2) of an integer array and placing it into Value - I:::::CH...lFCE I ';:;:()!..JFCt: UTILITY: Get_bytes General Procedure: This is similar to the "Get_value" utility. This utility retrieves a substring of a string passed as an argument, having been given the starting byte and the number of bytes to be retrieved. Special Requirements: The storage area set aside for the substring must be large enough to hold all of the substring. This includes not only the string itself, but also two extra words. Remember, a word holds two characters .

• A string must have been passed by the ICALL for the utility to work properly. Calling Procedure: 1. Store the number of the sta,rting byte of the substring desired into the first word of the storage area set aside for the substring. (Note that bytes 0 and 1 are the length word of the string.) 2. Store the number of bytes in the substring into the second word of the storage area. 3. Load register A with the address of the storage area. 4. Load register B with the address of the parameter declaration. 5. Call the utility.