A82: Loading 2 8bit numbers at once


[Prev][Next][Index][Thread]

A82: Loading 2 8bit numbers at once



How can I do the following using 16 bit registers to make it smaller? I
know the top can be done, and I think the bottom can be done, but I'm
not sure how to arange the 47 and 31 so it comes out the way I want.

ld a, 47
ld (TEXT_MEM), a
ld a, 31
ld (TEXT_MEM+1), a

ld a, (TEXT_MEM)
ld b, a
ld a, (TEXT_MEM+1)
ld c, a

call Point_On

I want to make it something like this:
ld hl, 4731
ld (TEXT_MEM), hl

ld bc, (TEXT_MEM)

call Point_On