Re: A83: Exchanging 16-Bit Numbers...?
[Prev][Next][Index][Thread]
Re: A83: Exchanging 16-Bit Numbers...?
In a message dated 10/10/98 12:49:13 PM, lairfight@softhome.net writes:
>
>On 10-Oct-98, Jkhum98@aol.com wrote:
>
>>Whats the correct syntax for loading a 16-bit number from a location,
>>to another location...? Something like this...
>>...
>>ld hl, (Var_Number_1)
>>ld (Var_Number_2), hl
>>...
>>Var_Number_1:
>>.dw 0
>>Var_Number_2:
>>.dw 0
>>...
>>That was just a general example of the direct approach I want to take,
>>but I know that syntax is completely wrong. I know I could use like "ex hl,
>>de" and work with that, but can someone tell me exactly what to use for
>>it...? Thanks... =)
>>--Jason K.
>
>Why is that completely wrong?
>
>Linus
Hmm, I was just thinking there'd be a little more to it than that. Like I
thought that this would not be possible: "ld (Var_8_Bit), b" because it
involves using the accumulator, so how come this 16-Bit operation is "legal"
to do this? Well, I must be having trouble on how im Storing these 16-Bit
Vars then... In the library table of SOS, I should be able to do this,
right...?
Libraries:
.db "ZGFXL", 0
Var_16_Bit:
.dw 0
.db lib2, vec0
.db $FF
And use that space safely huh? Well, thats the only new thing I've
incorporated into a program of mine, that has this use of 16-bit numbers now,
and I believe Im not using them correctly for some reason... My calc crashes,
and Once I got a RAM FAIL message... =\ I think I may be exceeding memory
space in there somewhere, since I dont understand how to use 16-Bit Numbers
that well... Well, whatever... =P
--Jason K.
Follow-Ups: