A86: Input string
[Prev][Next][Index][Thread]
A86: Input string
I need a string input routine. At ticalc.org, I found this one (below), which
says it outputs to op1. I'm new to asm, and I don't really know what op1 is.
I thought it had something to do with floating point calculations. Also, I
don't really understand how to use it. What are cleantmp and ptempcnt? I
would appreciate any help.
Thanks,
Bowser
ld de,_ioprompt
ld hl,str_prmpt
call _mov10b ; move prompt to prompt buffer , 21 max
ld hl,(_cleantmp)
push hl ;Saves current cleantmp value
ld hl,(_PTempCnt)
ld (_cleantmp),hl ; cleantmp=ptempcnt so input errors save temp var
ld a,0Ch
ld (_asap_ind),a ; set for 'inputstring'
call _exec_pg3 ; get string, op1 = var containing string
call _stoans ; store int 'Ans'
pop hl ; HL=PREVIOUS CLEANTMP
ld (_cleantmp),hl