Interrupts; Amsoft Assembler - AMSTRAD CPC464 User Manual

Cpc464 colour personal computer 64k
Hide thumbs Also See for CPC464:
Table of Contents

Advertisement

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
sequence above all other interrupts ensures that BASIC program
[ESC] [ESC]
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.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents