A83: Input for the 83 plus
[Prev][Next][Index][Thread]
A83: Input for the 83 plus
Is there a TI 83 plus eqivilant to this program from ASMGuru, or will I
have to write my own string input routines. (And numerical input
routines, too).
Jeremy
PGMIO_EXEC equ 50B2h
.org 9327h
call _clrLCDFull
ld de,821ch ;put the prompt here
ld hl,prompt
ld bc,16 ;length of prompt, max = 16
ldir
ld a,0 ;code for STRING input
ld (ASM_IND_CALL),a
call PGMIO_EXEC ;defined in squish.inc
call _CHKFINDSYM
push bc
push de
push hl
call _clrLCDFull
call _homeup
ld hl,Yourname
call _puts
call _newline
pop hl
pop de
pop bc
ex de,hl ;hl is start of string data
ld c,(hl)
inc hl
ld b,(hl)
inc hl ;bc is length of string
ld a,b
or c ;length = 0 ?
ret z ;return if so
loop:
push bc
ld a,(hl) ;get a character
call _putc
pop bc
dec bc
ld a,b
or c ;done yet?
inc hl ;
jr nz,loop ;no -> loop back
call _newline
ret
prompt: .db "Name: ",0
yourname: .db "Your name is",0