Re: A83: Strings
[Prev][Next][Index][Thread]
Re: A83: Strings
thanks a lot
Mike
At 07:11 PM 6/13/98 -0500, you wrote:
>
>> I was woundering how do you extract the info from strings and display it on
>> the screen. There is almost no documentatio on how to do this. If any one
>> knows please tell me. Also mabey someone can add this to the wish list, or
>> maby TI will answer themselves.
>
>here's one i made. i coulda' swore i posted this? maybe not.
>
>notes:
>
>1) "buffer" is a safe mem area that you copy the string data to so you
>can add a 0 terminator. there are better ways to do this. for instance
>you could use _putc to draw it char by char, so you don't need to add a
>0 terminator.
>
>2) the different var names are
>
> Str1 $04,$AA,$00
> Str2 $04,$AA,$01
> Str3 $04,$AA,$02
> Str4 $04,$AA,$03
> Str5 $04,$AA,$04
> Str6 $04,$AA,$05
> Str7 $04,$AA,$06
> Str8 $04,$AA,$07
> Str9 $04,$AA,$08
> Str0 $04,$AA,$09
>
>
>zstring.z80:
>
>.NOLIST
>#define equ .equ
>#define EQU .equ
>#define end .end
>#include "ti83asm.inc"
>#include "tokens.inc"
>.LIST
>
>#define buffer 8265h
>
>.org 9327h
>
> call _zerooop1 ; load var name
> ld hl,strngname ;
> ld de,op1 ;
> ld bc,3 ;
> ldir ;
> call _chkfindsym ; look it up
> ret c ; return if it is not found
> ex de,hl ; exchange de and hl
> ld c,(hl) ; get LSB of the size
> inc hl ; next byte
> ld b,(hl) ; get MSB of the size
> inc hl ; next byte
> ld de,buffer ; buffer
> ldir ; copy data
> ld a,0 ;
> ld (de),a ; add 0 terminator
> ld hl,buffer ; address to buffer
> call _puts ; display string
> call _newline ; move to a new line
> ret
>
>strngname:
>
> .db $04,$AA,$00 ; object type strng, var type strng, var Str1
>
>.end
>END
>
>