Nascom Newsletter |
Volume 3 · Numbers 5 & 6 · June 1984 |
Page 4 of 69 |
---|
SYS-EX is warm started by executing the program eleven (000BH) bytes on from the start. e.g. If it is installed between 1000H and 13FFH, SYS-EX is warm started with the NAS-SYS command:
E 100B
A warm start is a useful alternative to the NAS-SYS MRET instruction when ending an assembler program. e.g.
0000 C3 0B B0 JP SYSX
There are five unused keyboard commands (g j m o p) all of which cause a routine at 0400H beyond the start of SYS-EX to be called. Also, the two called routines USCR1 and USCR2 call a routine at 0400H beyond the start of SYS-EX. If suitable code is located at this address, the commands “g”, “j”, “m”, “o”, “p”, USCR1 and USCR2 may be used to call a further seven commands, five of which are accessible directly from the keyboard.
As SYS-EX is written in relocatable code, it is possible to copy SYS-EX itself into any suitable location in RAM and then to provide the extension commands in following RAM Locations.
On entry to the extension code located beyond SYS-EX, the NAS-SYS stack is in use. Care should therefore be taken to ensure that:
A return to SYS-EX may be made by executing a Z80 RET instruction. If the Carry flag is set upon return to SYS-EX, the message “Error” is displayed on the screen prior to the acceptance of further input.
Upon entry to the extension code, various Z80 registers have preset values. These values are as follows.
Register(s) | Contents |
---|---|
A | routine number or ASCII code |
HL | value from ARG1 |
DE | value from ARG2 |
BC | Value from ARG3 |
SP | 0C5FH within the NAS-SYS stack |
Fortytwo bytes are available on the stack for use by the
Page 4 of 69 |
---|