Re: A83: _convop1 prime
[Prev][Next][Index][Thread]
Re: A83: _convop1 prime
In a message dated 8/13/99 6:14:40 PM Central Daylight Time, Jkhum98 writes:
> In a message dated 8/13/99 4:45:58 PM Central Daylight Time, Ted21@aol.com
> writes:
>
> > Does anyone know a romcall that will do the exact opposite of the
romcall
> > _convop1 (moves op1 into register de). I want to move a register into
> op1.
> >
> > Any help will be appreciated.
> >
> > Ted
> >
>
> There's _setxxop1 and _setxxxxop2, but im sure youre familiar with those
> already. For a way to put DE into OP1, try this...
>
> push de
> call _zeroop1
> pop de
> ld (OP1+0), e
> ld (OP1+1), d
>
> although the problem there is that I am not sure of the order D and E
should
> be loaded into OP1, perhaps someone else knows that. Another problem is it
> could destroy many other registers, im not sure of which either, but maybe
> this process can help you. cya...
>
> Jason_K
> TCPA Member
> tcpa.calc.org
>
Hmm, I'm sorry, I realized the information I gave was false, once Scott Dial
reminded me of the FP Number Format that goes into the OP registers.
Unfortunately, the method I gave is not that easy, you cannot simply load the
memory locations the OP registers point to, with the values you want the
whole OP reg to contain. I cannot think of a better method, so its best if
you just use the provided romcalls "_setxxop1" and "_setxxxxop2". Those only
work with A and HL respectively, so to get DE into OP1, you must go through a
longer process...
push de
call _zeroop1
call _op1toop2
pop hl
call _setxxxxop2
call _op2toop1
Hmm, I hope that helps you. Maybe you already knew that path and were looking
for a simpler way, but I cant recall any other way to do it. cya...
Jason_K
TCPA Member
tcpa.calc.org