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 the file “!Main.asm”.
This file contains a list of #DEFINE statements, one for each configuration. These are all commented out except for the configuration to be built.
To add the configuration “MySC126”, edit the file to include the line:
It is recommended this line be added such that the configuration names are listed in alphabetical order.
Substitute a suitable name in place of “config_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, “config_MySC126”.
The file “config_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:
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:
These functions are described in detail here.