80-Bus News

  

July–October 1982 · Volume 1 · Issue 3

Page 18 of 51

Example 2
Machine Code Subroutine To Get Coordinates

Example 3 – MBASIC

This Basic program, which is well sprinkled with REM statements, is provided as a guide that others can follow. As it is purely for demonstration purposes the program has been coded for clarity.

Note: In line 1020 ADDR holds the address of where the USR routine is stored. Nascom Basic/​Nas-Sys users should pick an area within the workspace RAM (0C80H-0FFFH). GM809 users on a Nascom can use the workspace RAM as well, though in their case it is located at 0FC00H-0FFFFH. (NB Your CP/M system size should be 63K or less if you intend to use the workspace RAM).

For Multiboard users the problem is slightly more complex. Either a CP/M system can be used that is 1K less than the available memory size, or the /M option can be used when loading MBASIC to leave an area of RAM free for the machine code program.

Page 18 of 51