Prev: 9821 Up: Map Next: 984B
9837: Control Code 10: Set Ink Colour
ControlCode_SetInkColour 9837 LD HL,$F81E Set a pointer to Print_AttributeVariable in HL.
983A LD A,(HL) Fetch the current print attribute colour and store it in A.
983B AND %11111000 Mask off the current INK bits.
983D LD (HL),A Write the value back to *Print_AttributeVariable.
983E LD A,($F80C) Fetch the new INK colour from *PrintVariable_01.
9841 CP $08 Jump to Helper_Return if the new INK colour is invalid (08 or higher), valid ink values are between 00-07.
9843 JP NC,Helper_Return
9846 OR (HL) Set the new INK value with the current print attribute colour held by *HL.
9847 LD (HL),A Write the updated value back to *Print_AttributeVariable.
9848 JP ControlCode_Return_1 Jump to ControlCode_Return_1.
Prev: 9821 Up: Map Next: 984B