| Routines

03405: 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 | 03405 | XOR A | A is set to hold 0.
| 03406 | LD HL,(23693) | The current values of ATTR-P and MASK-P are fetched.
| 03409 | BIT 0,(IY+2) | Jump forward if handing the main part of the screen (bit 0 of TV-FLAG reset).
| 03413 | JR Z,TEMPS_1
| 03415 | LD H,A | Otherwise use 0 and the value in BORDCR instead.
| 03416 | LD L,(IY+14)
TEMPS_1 | 03419 | LD (23695),HL | Now set ATTR-T and MASK-T.
Next P-FLAG is considered.
| 03422 | LD HL,23697 | This is P-FLAG.
| 03425 | JR NZ,TEMPS_2 | Jump forward if dealing with the lower part of the screen (A=0).
| 03427 | LD A,(HL) | Otherwise fetch the value of P-FLAG and move the odd bits to the even bits.
| 03428 | RRCA
TEMPS_2 | 03429 | XOR (HL) | Proceed to copy the even bits of A to P-FLAG.
| 03430 | AND %01010101
| 03432 | XOR (HL)
| 03433 | LD (HL),A
| 03434 | RET |