
9.3 Interrupts
The CPC464 makes extensive use of the Z8O interrupt structure to provide an operating system that
includes several multitasking features as exemplified by the AFTER and EVERY structure described
in chapter 8. The precedence of the interrupts is:
Break
[ESC][ESC]
Timer 3
Timer 2 (and the three sound channel queues).
Timer 1
Timer 0
Interrupts should be included after considering the consequences of all the possible intermediate
variable states at the point of interruption. The interrupt subroutine itself should avoid unwanted
interaction with the state of variable in the main program.
The sound queues have indepedant interrupts of equal priority. Once a sound interrupt has started,
it is not interrupted by any other - enabling sound commands to share variables with immunity from
the effects mentioned above for the timer interrupt’s structure.
When a sound queue’s interrupt is enabled, it will immediately interrupt if the sound queue for that
channel is not full, otherwise it will interrupt when the next sound starts and there is room for more
in the queue. The action of interrupting disables the event, so the subroutine must re-enable it if
further interrupts are required. Attempting to issue a sound or testing the queue status will also
disable any event.
The priority of the
[ESC] [ESC]
sequence above all other interrupts ensures that BASIC program
operation can be halted without loss of the program - provided no ancillary action has been taken to
ensure the integrity of the program through one of the various protection techniques.
9.3 AMSOFT Assembler
In order to program extensively using machine code, it will be necessary to use an assembler. The
AMSOFT assembler comprises a relocatable Z80 assembler, with editor, disassembler and monitor.
Summary of Contents for CPC464
Page 1: ......
Page 102: ...PRINT 10 AND 12 Results in 8 PRINT 10 AND 1000 Results in 8 again ...
Page 118: ...TO DO DRAW THIS PAGE ...
Page 219: ...actual value may be made to vary during the execution of a program ...
Page 240: ...Text and WINDOW planner Mode 2 80 Columns ...
Page 241: ......