Prev: 36398 Up: Map Next: 36434
36413: Print Handler: Paper
Set PAPER colour parameter handler. Called on the byte immediately following a 17 (PAPER) control code. Masks the parameter to the lower three bits (colour 0–7) and writes it into the PAPER bits (3–5) of the attribute byte at PrintState_Attr.
PrintHandler_Paper 36413 LD B,8 B=8 (mask limit for PAPER colour range 0–7).
36415 CALL PrintHandler_MaskParam Call PrintHandler_MaskParam to reset PrintState_Handler and mask B to the colour value.
36418 LD A,(32772) A=*PrintState_Attr (current attribute byte).
36421 AND %11000111 Clear the PAPER bits (199 = keep INK, BRIGHT, FLASH).
36423 SLA B Shift B left three positions to move the colour into bits 3–5.
36425 SLA B
36427 SLA B
36429 OR B Write the new PAPER colour into bits 3–5.
36430 LD (32772),A Write the updated attribute byte back to *PrintState_Attr.
36433 RET Return.
Prev: 36398 Up: Map Next: 36434