This cassette contains many of the larger programs described in the book Assembly Language Programming on the Electron by the same authors. In addition, a useful programmer's toolkit is included the ELECTRON DEBUGGING TOOL (EDT). EDT provides extra commands that add to those already present in the Electron's Operating System, allowing the programmer to locate faults and make simple changes to machine code programs. EDT is a BASIC program that can be loaded into a safe area of memory.
The order of programs on the cassette is as follows. The program nuymbers (PRG) refer to the accompanying book Assembly Language Programming on the Electron:
Select a position for EDT in RAM, for example &4000.
Set the variable EDIT equal to the starting address, e.g. EDT=&4000 (RETURN) then type: *EXEC EDT (RETURN)
Start the tape recorder.
When loading is complete the help menu will appear. EDT is ready to receive a command.
List in mnemonics (disassemble)
eXamine/alter register contents
Dump memory contents to screen
Substitute memory data
set Breakpoint in program
Go - execute from address value
Exit EDT to BASIC
Help - display debugger guide
L - List in mnemonics
After selecting 'L', EDT prompts for a starting address. Enter the address in hex followed by the RETURN key. To continue with disassembly press the SPACE bar - to return to the command mode, press RETURN.
X - eXamine/alter register contents
Entering 'X' displays tge current contents of the integer variables A%, X%, Y% and C%. When a program is executed from EDT these variables are automatically transferred to the corresponding processor registers. When program control returns to EDT the above variables are updated from the processor registers.
To alter a register, enter a new value when the cursor lies beneath the selected register. Use the SPACE bar to leave the conents of a register unaltered.
D - Dump memory contents to screen
The 'D' command prompts for an address in hex followed by the RETURN key. The contents of 256 locations are then displayed in hex and ASCII. A second press of RETURN transfers control back to the command mode. Pressing SPACE will display another page of code.
S - Substitute memory data
Enter the address in hex followed by RETURN. The contents of the chosen location will be displayed. To alter, type in a new value - to leave unaltered press SPACE to progress to the next location. Pressing RETURN transfers control to the command mode.
(Note: EDT is protected against accidental damage by the substitute memory command.)
B - set Breakpoint
The 'B' command allows you to set a breakpoint within a machine code program. After executing the program with the 'G' command, the break instruction will return control to EDT, displaying the contents of the processor registers.
G - Go execute from address value
This command allows you to execute a machine code program from within EDT. If the program is terminated with an RTS instruction, control should return to EDT when the program is complete. If the processor encounters a BRK instruction, control returns to EDT after displaying the processor's registers.
E - Exit EDT
After entering 'E', control returns to BASIC with PAGE reset to its original value (before EDT was loaded). Function key 1 has been programmed to give an easy return to EDT.
H - Help
Pressing 'H' displays the Help Menu.
EDT uses the integer variables H% and W% to store the original value of PAGE and the start of EDT. If you use these variables in your program you will find it difficult to re-enter EDT.
Together with space for dynamic variables, EDT requires approximately &2000 bytes of RAM.
CTRL-B and CTRL-C can be used within EDT to enable and disable a printer.
EDT commands requiring a hex address will work with a RETURN - executing from the last address given.
The following utilities are also available to allow you to edit the supplied screens of this game:
A digital version of this item can be downloaded right here at Everygamegoing (All our downloads are in .zip format).