Re: A86: a couple questions that have been building up...
[Prev][Next][Index][Thread]
Re: A86: a couple questions that have been building up...
rabidcow@juno.com wrote:
> On Sun, 21 Jun 1998 21:41:28 EDT ComAsYuAre@aol.com writes:
> >
> >In a message dated 6/20/98 4:39:44 PM Eastern Daylight Time,
> >rabidcow@juno.com
> >writes:
> >
> >> ld a,$0c
> >> ld (_asap_ind),a
> >> call _exec_pg3
> >>
> >> rst 10h ;findsym
> >> ;bde->wlstring
> >> ld a,b
> >> ld h,d
> >> ld l,e
> >> call _load_ram_ahl
> >
> >
> >what does _load_ram_ahl do?
>
> it loads the page that the absolute address in ahl is on and make hl
> point to the right place. ick, it converts an absolute address in ahl to
> a normal address in hl
> i think it's in ti86abs.inc
>
> >how do i get the string into an OP? (or more than one or however many
> >it
> >needs)
>
> this will copy the entire string to start at _OP1. i would suggest using
> somewhere else, though 'cause it might overflow
> ld c,(hl)
> inc hl
> ld b,(hl)
> inc hl
> ld de,_OP1
> ldir
If you want to use _OP1 calls with this string, it won't work, you'll have to
ld c into the first byte of _OP1 and then the string.
I'm having the same problem with something I'm working on. I want to
input a string and then name a variable with that inputted string. There's
probably a different (better) input string routine to use, like the one that
only inputs 8 chars when naming a variable. But, if you can find the bug in
this code, I would appreciate it.
call _homeup
ld de,_ioPrompt
ld hl,prompt
call _mov10B ;move to prompt buffer
call _mov10B
ld hl,(_CLEANTMP)
push hl ;save _cleantmp
ld hl,(_PTempCnt)
ld (_CLEANTMP),hl
ld a,$0c ;value for input str
ld (_ASAP_IND),a
call _exec_pg3 ;input the string
pop hl
ld (_CLEANTMP),hl ;put _cleantmp back
rst 10h ;find string in new variable
ld a,b ;ld ahl,bde
ld h,d
ld l,e
call _GETB_AHL ;get the length byte
ld (_OP1),a ;put it into _op1
ld a,b ;get abs addr again
ex de,hl
call $4c3f ;inc ahl by two
call _SET_ABS_SRC_ADDR ;move from ahl
xor a
ld hl,_OP1+1 ;to _OP1+1
call _ABS_MOV10B_SET_D
ld hl,data_length
push hl
call _CREATESTRNG
ld a,b ;ld ahl,bde
ex de,hl
call $4c3f ;inc ahl by two
call _SET_ABS_DEST_ADDR
pop hl ;new string's size
xor a
call _SET_MM_NUM_BYTES
xor a
ld hl,source ;data to be loaded into new string
call _SET_ABS_SRC_ADDR
call _mm_ldir
Follow-Ups:
References: