Update README.md
This commit is contained in:
parent
18239c8c8b
commit
322e14bfe6
41
README.md
41
README.md
|
@ -18,6 +18,47 @@ The simulator works fine with modern mobile browsers, except that it is a bit ch
|
|||
|
||||
<img src="https://raw.githubusercontent.com/wixette/8800-simulator/master/design/sim-mobile.png" width="480">
|
||||
|
||||
## A Quick Tutorial
|
||||
|
||||
With the 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
|
||||
```
|
||||
|
||||
1 Turn on Altair 8800 by clicking OFF/ON switch.
|
||||
1 Set switches A7-A0 to 00 111 010 (up for 1, down for 0).
|
||||
1 Click "DEPOSIT".
|
||||
1 Set switches A7-A0 to 10 000 000.
|
||||
1 Click "DEPOSIT NEXT".
|
||||
1 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.
|
||||
1 Set switches A7-A0 to 10 000 000.
|
||||
1 Click "EXAMINE".
|
||||
1 Set switches A7-A0 to 00 000 001 (the first number to be added, or 1 in decimal).
|
||||
1 Click "DEPOSIT".
|
||||
1 Set switches A7-A0 to 00 000 010 (the second number to be added, or 2 in decimal).
|
||||
1 Click "DEPOSIT NEXT".
|
||||
1 Click "RESET".
|
||||
1 Click "RUN" and wait for a few seconds.
|
||||
1 Click "STOP".
|
||||
1 Set switches A7-A0 to 10 000 010 (the address that holds the sum).
|
||||
1 Click "EXAMINE".
|
||||
1 The LEDs D7-D0 show the result 00 000 011 (3 in decimal).
|
||||
1 Turn off Altair 8800.
|
||||
|
||||
## References
|
||||
|
||||
* [Wikipedia: Altair 8800](https://en.wikipedia.org/wiki/Altair_8800)
|
||||
|
|
Loading…
Reference in New Issue
Block a user