Prev: 9C79 Up: Map Next: 9D25
9D19: Get Blend Instruction
Gets the instruction that DrawGraphic uses to mix a graphic with what is on the screen, from bits 0-1 of the attribute.
Bits 0-1 Instruction
00 00 (NOP), which replaces what is on the screen
01 B6 (OR (HL))
02 AE (XOR (HL))
03 AE (XOR (HL))
Input
B The attribute
Output
A The instruction
GetBlendInstruction 9D19 LD A,B Fetch the attribute.
9D1A AND %00000011 Keep only bits 0-1.
9D1C RET Z Return if 00 (no blending).
9D1D CP $01 Compare A with 01...
9D1F LD A,$AE A=AE.
9D21 RET NZ Return if the comparison was not zero (XOR blending).
9D22 ADD A,$08 A+=08.
9D24 RET Return (OR blending).
Prev: 9C79 Up: Map Next: 9D25