Prev: 63637 Up: Map Next: 63673
63658: Merge Shifted Byte
Used by the routines at BuildShiftedShapeA and BuildShiftedShapeB.
Merges a byte of a shape into the buffer, shifted to the right by the number of pixels that the table in D gives. The shifted byte is two bytes: the first is ORed into the byte at HL' and the second into the one after it.
Input
D Page of the table of shifted bytes
HL Address of the byte to shift
HL' Address in the buffer
Output
HL' Address of the second byte that was merged
MergeShiftedByte 63658 LD E,(HL) Read HL into E.
63659 LD A,(DE) Read DE.
63660 EXX Switch to the alternate registers.
63661 OR (HL) Set the bits of A that are set in the byte at HL.
63662 LD (HL),A Write A where HL points.
63663 INC HL Advance HL.
63664 EXX Switch to the alternate registers.
63665 INC D Advance D.
63666 LD A,(DE) Read DE.
63667 DEC D Step D back.
63668 EXX Switch to the alternate registers.
63669 OR (HL) Set the bits of A that are set in the byte at HL.
63670 LD (HL),A Write A where HL points.
63671 EXX Switch to the alternate registers.
63672 RET Return.
Prev: 63637 Up: Map Next: 63673