A86: Re: Re: external strings


[Prev][Next][Index][Thread]

A86: Re: Re: external strings



Thanks, Dux!!! BTW, I love your tutorial!!!!
--------------
Jbrett
tbarwick@esn.net
http://ww2.esn.net/~tbarwick
I just added a TI-86 page, Check it out!!!  
-----Original Message-----
From: Dux Gregis <assets@eden.rutgers.edu>
To: assembly-86@lists.ticalc.org <assembly-86@lists.ticalc.org>
Date: Tuesday, September 22, 1998 6:13 PM
Subject: A86: Re: external strings

From this point,
-----Original Message-----
From: JBrett <tbarwick@esn.net>
To: ASM86 Mailing List <assembly-86@lists.ticalc.org>
Date: Tuesday, September 22, 1998 5:01 PM
Subject: A86: external strings

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.