I am having trouble trying to read an external
string from an assembly program. Can I just do:
start:
ld hl,string-1
rst $20
rst $10
jr c,start
;Can I just inc hl a certain
number of times to get to the place in the string that I want to read
from??? What should I do??
string:
.db
6,"string"
From this point, bde will point to the
string data (two bytes for string length followed by the string
itself). You will probably want to move this into ahl so that you
can use the calls in ti86abs.inc: <ld a,b / ex de,hl>.
<call $4c3f> will increment ahl twice so that ahl points to the
actual string (you may want to load the string length into bc so that
you will know where the string ends). Then use _inc_ptr_ahl to
search the string or write an abs address addition routine to get to a
specific place; use _mm_ldir or _GETB_AHL to read the
string.