The Small Computer Monitor (SCM) is available in a number of different configurations. The configuration determines:
- Compile time options, such as default baud rate
- Build name and date
- Hardware support
- Additional ROM contents, such as extra programs
SCM is divided into four parts:
- The Operating System Layer
- The Monitor Program
- The Basic Input/Output System (BIOS)
- Additional ROM contents (optional)
The BIOS is the part that handles hardware support and is customised for the target hardware.
Source code structure
The SCM source distribution includes the folder: Source. The significant contents are:
- Folder: BIOS
- Folder: Config
- Folder: Monitor
- Folder: System
- File: !Main.asm
Folders “Monitor” and “System” should not normally be changed when creating a new configuration or porting SCM to a new hardware target.
Adding a new configuration to file !Main.asm
A new configuration could just be a ROM with different additional ROM contents, such as a BASIC interpreter, or it could be a build of SCM for a new hardware target.
To add a new configuration you should first edit !Main.asm. This file has two sections:
- A list of #DEFINE statements, one for each configuration. These are all commented out except for the configuration to be built.
- A set of #IF … #ENDIF statements to include the required build files.
To add the configuration “MySC126”, edit the file to include the line:
#DEFINE BUILD MySC126
It is recommended this line be added such that the configuration names are listed in alphabetical order.
In the lower section of the file, add the statements:
#IF BUILD = "MySC126" #INCLUDE Config\MySC126.asm #ENDIF
Substitute a suitable name in place of “MySC126”.
Adding a new configuration to folder “Config”
First make a copy of one of the existing .ASM files in the folder “Config” and give it the name chosen above. For example, “MySC126”.
The file “MySC126.asm” will contain something like this:

Further explanation of this file can be found here.
Adding a new configuration to folder “BIOS”
If you are using the framework and an existing BIOS, there is no need to make any changes in the BIOS folder.
If you need to create a new BIOS then follow these instructions.
First make a copy of one of the existing folders “BIOS” and give it a suitable name. For example, “MyBIOS”.
Within the newly created folder there should be a file called “Manager.asm” and possibly others.
The source file “Manager.asm” is responsible for defining the following constants:
- BNAME
- kBiosID
- kBiosMajor
- kBiosMinor
- kBiosRevis
The BIOS name can be anything you like. It appears in the SCM help text.
It would be best to ask me for a BIOS ID, but failing that, select a value over 100 to avoid conflicts with official SCM releases.
The BIOS version consists of three numbers, each between 0 and 9.
The source file “Manager.asm”, plus any additional files included with #INCLUDE statements, is responsible for providing the following functions:
- H_Test
- H_Init
- H_GetName
- H_GetVers
- H_SetBaud
- H_IdleSet
- H_MsgDevs
- H_RdRAM
- H_WrRAM
- H_CopyROM
- H_ExecROM
- H_Delay
These functions are described in detail here.