Prev: 44283 Up: Map Next: 44650
44633: Copy Display Data If Zero
Used by the routine at 44283.
Conditionally copies a 2-byte display data value from DE to HL if the destination is currently zero. Used to initialise display data only when it hasn't been set yet.
Input
HL Destination pointer (2-byte display data)
DE Source pointer (2-byte display data)
CopyDisplayDataIfZero 44633 LD A,(HL)
44634 INC HL
44635 OR (HL)
44636 DEC HL
44637 JR NZ,CopyDisplayDataIfZero_0
44639 LD A,(DE)
44640 LD (HL),A
CopyDisplayDataIfZero_0 44641 INC HL
44642 INC DE
44643 JR NZ,CopyDisplayDataIfZero_1
44645 LD A,(DE)
44646 LD (HL),A
CopyDisplayDataIfZero_1 44647 INC HL
44648 INC DE
44649 RET
Prev: 44283 Up: Map Next: 44650