I have written an instruction set simulator for the T-1. It is an arduino sketch, and runs on an Arduino Mega 2560, using the onboard UART to provide the operator interface. Current simulator functionality includes:
- Single step and continuous execution modes
- Execution breakpoints
- Inspect and modify stacks, system RAM and code memory
- Inspect and modify top-of-stack register and program counter
- Halt on stack under- and overflow
To get a program into the simulator, I have written a shell script that does the following:
- Calls the ASL assembler to assemble the code
- Calls P2HEX to convert the assembled code into an ASCII hex format
- Converts the hex file (using awk) to a header file that is an initialised C array of unsigned ints
When the sketch is uploaded to the arduino, the header file is included and provides the instructions for the simulator.
The simulator will allow me to experiment with different instructions, and allow me to test programs before I commit to wiring them.
Here's a screen capture of the main menu:
and a code memory dump:
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.