Prev: 8E2E Up: Map Next: 8E52
8E3D: Print Handler: Paper
Set PAPER colour parameter handler. Called on the byte immediately following a 11 (PAPER) control code. Masks the parameter to the lower three bits (colour 00–07) and writes it into the PAPER bits (3–5) of the attribute byte at PrintState_Attr.
PrintHandler_Paper 8E3D LD B,$08 B=08 (mask limit for PAPER colour range 00–07).
8E3F CALL PrintHandler_MaskParam Call PrintHandler_MaskParam to reset PrintState_Handler and mask B to the colour value.
8E42 LD A,($8004) A=*PrintState_Attr (current attribute byte).
8E45 AND %11000111 Clear the PAPER bits (C7 = keep INK, BRIGHT, FLASH).
8E47 SLA B Shift B left three positions to move the colour into bits 3–5.
8E49 SLA B
8E4B SLA B
8E4D OR B Write the new PAPER colour into bits 3–5.
8E4E LD ($8004),A Write the updated attribute byte back to *PrintState_Attr.
8E51 RET Return.
Prev: 8E2E Up: Map Next: 8E52