| Routines

0D4D: THE 'TEMPORARY COLOUR ITEMS' SUBROUTINE

Used by the routines at PO_SCR, CLS, CL_ALL, ED_COPY, CHAN_S, CLASS_07, CLASS_09, LPRINT, PLOT and DRAW. This is a most important subroutine. It is used whenever the 'permanent' details are required to be copied to the 'temporary' system variables. First ATTR-T and MASK-T are considered.
TEMPS | 0D4D | XOR A | A is set to hold +00.
| 0D4E | LD HL,($5C8D) | The current values of ATTR-P and MASK-P are fetched.
| 0D51 | BIT 0,(IY+$02) | Jump forward if handing the main part of the screen (bit 0 of TV-FLAG reset).
| 0D55 | JR Z,TEMPS_1
| 0D57 | LD H,A | Otherwise use +00 and the value in BORDCR instead.
| 0D58 | LD L,(IY+$0E)
TEMPS_1 | 0D5B | LD ($5C8F),HL | Now set ATTR-T and MASK-T.
Next P-FLAG is considered.
| 0D5E | LD HL,$5C91 | This is P-FLAG.
| 0D61 | JR NZ,TEMPS_2 | Jump forward if dealing with the lower part of the screen (A=+00).
| 0D63 | LD A,(HL) | Otherwise fetch the value of P-FLAG and move the odd bits to the even bits.
| 0D64 | RRCA
TEMPS_2 | 0D65 | XOR (HL) | Proceed to copy the even bits of A to P-FLAG.
| 0D66 | AND %01010101
| 0D68 | XOR (HL)
| 0D69 | LD (HL),A
| 0D6A | RET |