![]() |
The following sample programs and tapes are provided:
In addition this page provides some notes about the binary and ASCII tape formats used by the simulator and details of how to recover programs from cassette tapes.
Note: Where indicated (using a cassette image) some of these sample programs and tapes are recovered from original software. I do not own the copyrights for these recovered programs and so I sincerely hope no one will mind them being included in this package. If any of the original copyright owners object, please contact me at the email address at the bottom of the page and I will gladly remove anything that should not be here.
Source Code | samples/basic/hello1.basic |
This is a very simple "hello world" BASIC program. This program is used in the quick start guide.
This should be loaded as a BASIC program by typing the LOAD
command in BASIC and playing the tape.
Source Code | samples/basic/charset.basic |
This is the program from page 38 of the manual which can be used to display most of the character set of the machine. It is not quite the same as the listing in the manual, as that listing actually contains a couple of bugs and also needed some changes to work correctly with the New Monitor.
This should be loaded as a BASIC program by typing the LOAD
command in BASIC and playing the tape.
![]() |
|
This is a game that was provided on a sample tape that came with the original machine.
This should be loaded as a BASIC program by typing the LOAD
command in BASIC and playing the tape.
You should set the keyboard to raw mode
to play the game.
![]() |
|
This is a game that was provided on a sample tape that came with the original machine.
This should be loaded as a BASIC program by typing the LOAD
command in BASIC and playing the tape.
You should set the keyboard to raw mode
to play the game.
![]() |
|
This is the Extended Monitor that was provided on a sample tape that came with the original machine. The extended monitor provided some extra function to help with writing and debugging simple machine code programs.
Details of the extended monitor can be found on its instruction sheet.
The extended monitor is a machine code program and needs to be loaded through the Monitor, not as a BASIC program. To do this first reset the machine then select M to enter the monitor, press the L key to begin loading and play the tape. The extended monitor first loads a short checksum loader routine then loads the rest of itself in checksum format.
![]() |
|
This is a copy of Premier Publication's excellent Invaders space invaders game.
Invaders is a machine code program and needs to be loaded through the Monitor, not as a BASIC program. To do this first reset the machine then select M to enter the monitor, press the L key to begin loading and play the tape. Once the game is loaded you can reset the machine and perform a warm start to restart it at any time.
The game was intended to be played on a standard 1Mhz processor, if you have over-clocked the processor (see system configuration) it may run too fast. Some old notes I have suggest that location $0F69 defines the game speed with the default value being 20 - on a 2MHz machine this might be best changed to 40, it says.
To move the laser the CTRL is used to go left and the left-SHIFT key is used to go right. On a real UK101 the CTRL-key is above the SHIFT-key so CTRL-for-left and SHIFT-for-right makes sense. Unfortunately these keys are the other way up on a PC keyboard so this is not ideal! I once knew some locations to patch to change these keys, but I can no longer find those notes - sorry! You should set the keyboard to raw mode to play the game.
When the UK101 wrote data to a cassette tape it was written as a series of bytes. Although most of the bytes that were written were standard ASCII characters, the tapes would include some control characters, some padding NUL (0x00) characters and possibly some bytes whose values were outside the range of the standard character set. If these tapes are saved as PC files, the resulting file is not guaranteed to be viewable on the PC and can probably not be successfully edited using standard PC editors without some data corruption.
To help overcome these problems the simulator allows tapes to be stored in one of two formats:
All the sample machine code programs are in binary format
and have a file extension of .tape
.
The conversion leaves any standard ASCII character unchanged,
it detects line ends and stores them as standard PC style
line ends and any other unrecognised byte is converted to an
escaped form \nn
where nn
is a pair of hexadecimal digits.
All the sample BASIC programs are in ASCII format and
have a file extension of .basic
.
The simulator will correctly recognise and load tapes in both binary or ASCII format and can save in either format. If you are saving a BASIC program it would make sense to save in ASCII format (which is the default) as the resulting program can then be viewed and edited on the PC. If you are saving a tape to potentially load back onto a real UK101 you will need to ensure it is in binary format.
The utility programs Tape Reader and Tape Writer can be used to quickly convert between the two formats.
If you have original UK101 programs on old cassette tapes it is usually possible to recover them on a PC so they can be loaded and used with the simulator, provided the tapes are still playable and provided you still have something to play them with. This is done using an excellent piece of software written by Martin Ward that can decode the tape sounds to recover the original data bytes. The process is something like this:
Tim Baldwin October 2011 tjb101@tinymail.co.uk |
Return to index
© Tim Baldwin 2010,2011 |