HP 9835A Programming Manual page 144

35 series desktop computer assembly development rom
Table of Contents

Advertisement

126
Communication Between BASIC and Assembly Language
Calling Procedure:
1.
Store the number of the starting
byte
of the substring to be changed into the first word of
the storage area. (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. Store the element offset into the array information (word 16).
4. Load register A with the address of the storage area for the string to be transferred.
5. Load register B with the address of word 0 of the information returned by the
"Get_info" utility (see description of that utility).
6. Call the utility.
Exit Conditions: There are no error exits from the utility.
It always returns to the instruction
following the call.
For example-
1st
c~iracter
(ignore length)
Transfer 10
cha~acters
Substring storage area
ISOURCE Array info:BSS 30
EQU Array info+16
ISOURCE Parameter: STR
(*)
L.. })
i:i
::::
f! r
o
"
i"' " .:~j.
:) ' i
!"'j
f' ()
L..
Ii J3 ::::: F>
.~J. i· .. ·
.::l.
i"l"i
!::;'
t
~::'
r
o
"
Info
alrs~dy
saved
JSM Put e1em bytes
In this example, Value is the storage area for the string to be transferred. Since 2 has already
been generated and stored in the first word, and 10 in the second, the first 10 bytes of the string
element are changed. It is the responsibility of the software (not shown) to assure that 10
characters of valid data are stored in the remainder of the storage area.

Advertisement

Table of Contents
loading

Table of Contents