New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AltairZ80: Question about setting the Switch Register (SR) #1190
Comments
The Altair data bus is 8 bits. Switches A8 through A15 are used as the sense switches and are placed on the data bus as D0 through D7. The status of the A8 through A15 switches are read by performing an IN 0FFH instruction. A0 through A7 are ignored. Setting the SR register to 8 simulates setting switch A11 on and all the other sense switches off which causes 08H to appear on the data bus during an IN 0FFH instruction. The Altair does not have Programmed Output LEDs like the IMSAI but is simulated by a "SET CPU PO". With PO enabled, an OUT 0FFH instruction will display the contents of the A register on the console. |
Thanks for your reply. There are still 2 things I don't understand however:
|
SR is an 8-bit register. If you run "HELP CPU", you will see that it is an 8-bit register:
The Intel 8080 has a 16-bit address bus and an 8-bit data bus. Switches A0-A15 are tied to the address bus. Switches A0-A7 are also tied to the data bus for memory deposits. A8-A15 are also tied to the data bus during an IN 0FFH instruction. |
Hello deltecent, |
I will check with @psco on the register value. It may be 16 bits for other CPUs supported by the simulator. For the Altair 8800 with an 8080 or Z80 CPU, it is definitely 8 bits and is set with switches A8-A15. |
The documentation has been corrected for Open SIMH. It now shows SR as being an 8-bit value. |
This is not a normal issue, it's only a questions I've been wanting to ask for quite some time now, and I'm not sure where to do that.
In the AltairZ80 documentation I see the recommendation to set the SR register to 8 when loading, for example, 4k BASIC.
However, in the original BASIC documentation, in the section that explains how to load and initialize BASIC, they're talking about setting switches A8 through A15.
Setting the SR register to 8 would be like setting front panel switch A3 to 1, wouldn't it?
If that's true, how can 8 be a suitable value for SR when loading BASIC?
The text was updated successfully, but these errors were encountered: