Prev: 9818 Up: Map Next: 9837
9821: Control Code 12: Set Bright Bit
ControlCode_SetBrightBit 9821 LD HL,$F81E Set a pointer to Print_AttributeVariable in HL.
9824 LD A,(HL) Fetch the current print attribute colour and store it in A.
9825 AND %10111111 Mask off the current BRIGHT bit.
9827 LD (HL),A Write the value back to *Print_AttributeVariable.
9828 LD A,($F80C) Fetch the new BRIGHT value from *PrintVariable_01.
982B CP $02 Jump to Helper_Return if the new BRIGHT value is invalid (02 or higher), valid values are either 00 or 01.
982D JP NC,Helper_Return
9830 RRCA Shift the value into bit 6 so it applies for BRIGHT.
9831 RRCA
9832 OR (HL) Set the new BRIGHT value with the current print attribute colour held by *HL.
9833 LD (HL),A Write the updated value back to *Print_AttributeVariable.
9834 JP ControlCode_Return_1 Jump to ControlCode_Return_1.
Prev: 9818 Up: Map Next: 9837