3.5 KiB
Altair 8800 simulator.
A JavaScript simulator to demonstrate the front panel operations of Altair 8800.
Usage
Simply open index.html in browser, or copy the entire dir to your web server's root dir.
The simulator UI supports English and Chinese for now. In a desktop browser, you may use mouse to toggle or click the switches on the panel directly.
There is a DEBUG tab where you can check the internal status of the simulated 8080 CPU, or the contents of the simulator's memory.
The simulator works fine with modern mobile browsers, except that it is a bit challenging to touch a single switch on the panel on a mobile screen. Although, the helper switch buttons below the panel can be used as an alternative solution.
A Quick Tutorial
With a running Altair 8800 simulator, how to input and run the following program to calculate 1 + 2 = 3:
LDA 0080H ; 00 111 010
; 10 000 000
; 00 000 000
MOV B,A ; 01 000 111
LDA 0081H ; 00 111 010
; 10 000 001
; 00 000 000
ADD B ; 10 000 000
STA 0082H ; 00 110 010
; 10 000 010
; 00 000 000
JMP 0000H ; 11 000 011
; 00 000 000
; 00 000 000
- Turn on Altair 8800 by clicking OFF/ON switch.
- Set switches A7-A0 to 00 111 010 (up for 1, down for 0).
- Click "DEPOSIT".
- Set switches A7-A0 to 10 000 000.
- Click "DEPOSIT NEXT".
- Repeat step 4-5 to input the following bytes one by one: 00 000 000, 01 000 111, 00 111 010, 10 000 001, 00 000 000, 10 000 000, 00 110 010, 10 000 010, 00 000 000, 11 000 011, 00 000 000, 00 000 000.
- Set switches A7-A0 to 10 000 000.
- Click "EXAMINE".
- Set switches A7-A0 to 00 000 001 (the first number to be added, or 1 in decimal).
- Click "DEPOSIT".
- Set switches A7-A0 to 00 000 010 (the second number to be added, or 2 in decimal).
- Click "DEPOSIT NEXT".
- Click "RESET".
- Click "RUN" and wait for a few seconds.
- Click "STOP".
- Set switches A7-A0 to 10 000 010 (the address that holds the sum).
- Click "EXAMINE".
- The LEDs D7-D0 show the result 00 000 011 (3 in decimal).
- Turn off Altair 8800.
References
- Wikipedia: Altair 8800
- Wikipedia: Intel 8080 CPU
- Intel 8080 instruction set
- Original Altair 8800 manuals
- Altair 8800 Operator's Manual
- Intel 8080 Assembly Language Programming Manual
- Another Altair 8800 simulator
Acknowledgements
I use https://github.com/maly/8080js to execute Intel 8080 instruments.
The Quick Tutoral in the simulator UI refers to an example program got from the original Altair 8800 Operator's Manual.
The interaction design took another Altair 8800 simulator as a reference.