Routines |
Prev: 1C79 | Up: Map | Next: 1CBE |
The address of this routine is derived from an offset found in the command class table.
This subroutine allows for the current temporary colours to be made permanent. As command class +07 it is in effect the command routine for the six colour item commands.
|
||||
CLASS_07 | 1C96 | BIT 7,(IY+$01) | The syntax/run flag (bit 7 of FLAGS) is read. | |
1C9A | RES 0,(IY+$02) | Signal 'main screen' (reset bit 0 of TV-FLAG). | ||
1C9E | CALL NZ,TEMPS | Only during a 'run' call TEMPS to ensure the temporary colours are the main screen colours. | ||
1CA1 | POP AF | Drop the return address SCAN_LOOP. | ||
1CA2 | LD A,($5C74) | Fetch the low byte of T-ADDR and subtract +13 to give the range +D9 to +DE which are the token codes for INK to OVER. | ||
1CA5 | SUB $13 | |||
1CA7 | CALL CO_TEMP_4 | Change the temporary colours as directed by the BASIC statement. | ||
1CAA | CALL CHECK_END | Move on to the next statement if checking syntax. | ||
1CAD | LD HL,($5C8F) | Now the temporary colour values (ATTR-T and MASK-T) are made permanent (ATTR-P and MASK-P). | ||
1CB0 | LD ($5C8D),HL | |||
1CB3 | LD HL,$5C91 | This is P-FLAG, and that too has to be considered. | ||
1CB6 | LD A,(HL) | |||
The following instructions cleverly copy the even bits of the supplied byte to the odd bits, in effect making the permanent bits the same as the temporary ones.
|
||||
1CB7 | RLCA | Move the mask leftwards. | ||
1CB8 | XOR (HL) | Impress onto the mask only the even bits of the other byte. | ||
1CB9 | AND %10101010 | |||
1CBB | XOR (HL) | |||
1CBC | LD (HL),A | Restore the result. | ||
1CBD | RET |
Prev: 1C79 | Up: Map | Next: 1CBE |