A86: Re: Input / Output
[Prev][Next][Index][Thread]
A86: Re: Input / Output
>
>I have read this and I understand it pretty well, but I have one problem.
>At the end it stores the OP1 into the Ans.
It doesn't actually store the string at OP1, it creates a new variable (a
string) that holds inputted string. OP1 holds the name to the new variable
in OP1. So, if you call FINDSYM (rst $10), bde will point to the string. I
don't know of a call to display an absolutely addressed double length byte
string, so this *should* put the string (limit of 9 bytes in length):
rst $10 ;findsym
ld a,b
ld h,d
ld l,e ;put bde (abs pointer from findsym) into
ahl
call _GETB_AHL ;A is byte at ahl
push af ;temp save length
ld a,b
ex de,hl ;get ahl from bde again
call _inc_ptr_ahl
call _ABS_MOV10B_SET_D ;move 10 bytes to OP1
ld hl,_OP1
pop af
ld (hl),a
call _putps
How do I display that now? Is
>there a way to display the OP1 and a way to display the Ans, all I need is
>the call for it.. (and which header would help :)? Thanks for any help..
>Sorry if I sound confusing.. :)
>
> call _homeup ; cursor to top left
> ld hl,str_prmpt
> call _puts
> ld de,_ioPrompt
> call _mov10B ; move prompt to prompt buffer , 21 max
> LD hl,(_CLEANTMP)
> push hl
> LD hl,(_PTempCnt)
> LD (_CLEANTMP),HL
> 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
>
>