Re: A83: displaying user str0-9
[Prev][Next][Index][Thread]
Re: A83: displaying user str0-9
>Ti-BASIC strings...
>You should be familiar with Str0 to Str9 if you ever programmed on your Ti
>in BASIC...
>
>
I don't know much about ASM, but I've read in Asmguru a tutorial about
displaying strings. This program I've copied from. Sorry for that. If you've
got Asmguru, look at tutorial 26.
.NOLIST
#define equ .equ
#define EQU .equ
#define end .end
#include "ti83asm.inc"
#include "tokens.inc"
.LIST
_errundefined .equ 467Bh
strngobj .equ 04h
.org 9327h
call _zerooop1 ; clear op1
ld hl,op1 ; load var name for Str1 into op1
ld (hl),strngobj ;
inc hl ;
ld (hl),tvarstrng ;
inc hl ;
ld (hl),tstr1 ;
call _chkfindsym ; look it up
jp c,_errundefined ; error if not found
push de ;
pop hl ; hl -> string address
call _ldhlind ; hl -> string size
push hl ;
pop bc ; bc -> string size
inc de ;
inc de ; de -> string data
sloop:
ld a,(de) ; get character
call _putc ; draw character
inc de ; next character
dec bc ; decrement counter
ld a,b ; see if bc is at 0
or c ;
jr nz,sloop ;
call _newline ; move to a new line
ret
.end
END
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.