Re: A86: a couple questions that have been building up...
[Prev][Next][Index][Thread]
Re: A86: a couple questions that have been building up...
On Mon, 22 Jun 1998 16:09:14 -0600 Dux Gregis <assets@eden.rutgers.edu>
writes:
>
>
>
>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
move these two down there
---> 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
also, the length byte for a variable name goes in _OP1+1, _OP1 holds the
type byte
why are you using absolute addresses so much?
this finishes what your code did without so much abs addr work:
call _load_ram_ahl
ld a,(hl) ;copy to op1
rst 20h
ld (_OP1+1),a
<--- move those two to here. (or at least after the "rst 10h")
> ld hl,data_length
> push hl
> call _CREATESTRNG
> ld a,b ;ld ahl,bde
> ex de,hl
call _load_ram_ahl
inc hl
inc hl
pop bc ;new string's size
ld de,source ;data to be loaded into new
ex de,hl
ldir
ok, maybe if the string runs over a page boundary, then you'd have to use
abs addr stuff. unless you switched _load_ram_ahl with one of those
deals that loads two ram pages at once... maybe: (might work, might not,
anyone wanna test it?)
call _load_ram_ahl
out ($05),a
inc a
out ($06),a
res 7,h
set 6,h
and end with
out ($05),$0d
-josh
_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]
Follow-Ups:
References: