Prev: F895 Up: Map Next: F8B9
F8AA: 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 F8AA LD E,(HL) Read HL into E.
F8AB LD A,(DE) Read DE.
F8AC EXX Switch to the alternate registers.
F8AD OR (HL) Set the bits of A that are set in the byte at HL.
F8AE LD (HL),A Write A where HL points.
F8AF INC HL Advance HL.
F8B0 EXX Switch to the alternate registers.
F8B1 INC D Advance D.
F8B2 LD A,(DE) Read DE.
F8B3 DEC D Step D back.
F8B4 EXX Switch to the alternate registers.
F8B5 OR (HL) Set the bits of A that are set in the byte at HL.
F8B6 LD (HL),A Write A where HL points.
F8B7 EXX Switch to the alternate registers.
F8B8 RET Return.
Prev: F895 Up: Map Next: F8B9