Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

which is pre-defined pseudo instructions (macros) allowed by the assembler called 'CALL_OZ' and 'OZ' to generate the calls. A macro is to be recommended for automatic generation of the one and two byte codesMacros are pre-defined for the system calls which may be included in your source code. However it is written, this code sends the character whose ASCII value is in A to the screen. This format of operating system call has the merit of economy of space; one byte for the RST instruction, one byte for the appended function code. The system call can easily find the appended byte using the return address pushed by the RST instruction and adjust the return address to point after it. A scheme in which the function code was loaded into a register before executing RST $20 would waste an extra byte every time the function is called.

...

When system calls expect local pointers to information it is vital that this information is kept with the current bank boundary. System calls keep track of the source bank of the pointer but does not expect it to cross bank boundaries. The end result of this is random. GN_Sop (write string to std. output) for example just displays rubbish from the point of the bank boundary onwards.