Re: A86: Basic to Asm Variable Transfer
[Prev][Next][Index][Thread]
Re: A86: Basic to Asm Variable Transfer
Matt2000 wrote:
> >>I need help transferring variables from basic to asm for a game I am
> making.
> >You could use _rclx and _rcly (don't remember the equates). They put the
> >values of the BASIC variable in x/y in _OP1.
>
> Hmm.. I know you can load any external variable by using _findsym. This (If
> I remember correctly), will have HL pointing to
> the data and the correct ram page set for the start of the variable data.
> Then for Real Variables use _mov10b (I think), which would move 10 bytes
> from (HL) to OP1. Then there you go. If you are needing strings you will
> have to use block move operations (see (sqrt)PRGRM template on Dux Gregis's
> site for Absolute addressing block move operation examples).
> Of course this is all of the top of my head any I may (and often am) be
> incorrect.
Actually, bde points to the start of the data. You want to do something like
this:
ld hl,variable_name
rst 20h
rst 10h
ld a,b
ex de,hl
call _ABS_MOV10TOOP1
call _convop1
I don't remember what registers it will end up in. Probably ahl.
References: