Nascom Newsletter |
Volume 3 · Number 1 · April 1983 |
Page 19 of 37 |
---|
characters which are often received from a cassette recorder ( and which make a mess of the screen ) after a program has been read from tape.
Many of the features within SYS-EX will be of interest to the assembler programmer. All of the SYS-EX commands may be called by an assembler program. The available commands include all of the SYS-EX keyboard commands plus several additional useful routines. All calls are made to the same entry point within SYS-EX. This entry point is three bytes on from the beginning of SYS-EX. The required routine number is specified by the value in the byte which immediately follows the call instruction. Those of you who are familiar with using the NAS-SYS routines from within an assembler program, will notice the similarity in the use of SYS-EX routines. By way of an example, if SYS-EX is installed between B000H and B3FFH, a straightforward call to a SYS-EX routine is coded as follows:
CD 03 B0 nn
where nn is the required routine number. The routine number for a keyboard command is the ASCII code of the command letter. (e.g. ‘a’ and ‘z’ are represented by 61 and 7A respectively.) In addition to the keyboard commands, a further nine routines are provided in routine numbers 7B to 83. Complete details on these routines will be printed in a future issue.
Having described some of the features of SYS-EX, it might now be of interest to explain something of the structure of this monitor extension. SYS-EX begins with a control section which takes over from NAS-SYS in recognising and routing both upper and lower case keyboard commands. The mechanism for calling SYS-EX commands from an assembler program is embedded within this control section. Part of the control section processing works out the absolute address at which SYS-EX is actually installed. This absolute address is used in conjunction with an internal table of relative addresses, to calculate the absolute address of each required routine. The internal table of relative addresses is located between offset 0139H and 017EH inclusive. Each table entry is two bytes long with the first table entry representing the ‘a’ command, the second table entry representing the ‘b’ command and soon. Entries in this table represent the start of the routine relative to the beginning of SYSS-EX.
In common with NAS-SYS, SYS-EX does not use the alternate set of registers nor does it use the index registers. SYS-EX does not require any of its own stack or work space, although it does make use of the NAS-SYS stack. Certain fields within the NAS-SYS workspace are used by SYS-EX, although the places where such fields are used will always be explicitly mentioned within the text.
And now for a bit of history. SYS-EX began it’s life about a year and a half ago when the author decided that it would be useful to have the facility to name machine code files written
Page 19 of 37 |
---|