Console interface software

When the software starts (power-up or manual reset), in normal mode, the console interface application starts.
Only when, at reset, the button connected to the CTS pin of the ACIA is pressed, the simple debug monitor is started.

The console interface application sets the default data direction of the I/O ports of the PIA and enters a loop.
As long as no command is sent to the console interface application, the software is in "stand-alone" mode.
After the reset, and the debug monitor is not started, the software reads the ADDRESS / DATA switches [0:2] and uses the position of these 3 switches to determine which idle pattern is displayed on the DATA LEDs as long as the console interface application remains in stand-alone mode. The idle pattern can easily be changed in the EPROM to whatever pattern you like to see.

You can test all hardware while in stand-alone mode: the DATA LEDs show an idle pattern, and the position of the switches and the toggle buttons is reflected on, respectivily, the ADDRESS and FUNCTION LEDs. Normally, the FUNCTION LEDs are all off because the toggle buttons are in their rest position if they are not pressed. Only the HALT / ENABLE switch could light up one FUNCTION LED permanently (as long as the switch is activated).

After the console interface application received the command what type of console must be emulated, the software leaves the stand-alone mode and starts the console mode. All commands shown below are accepted while in console mode.

In the initial design of the console interface application I implemented a double set of all commands. One set being used when the application started automatically from reset. This set contained only binary data so that the communication over the serial line was as efficient (short) as possible.
The other set was written for test purposes when the application was started through the debug monitor command '$!'.

The '$!' command (say: "dollar - bang") was choosen because on the SPERRY / UNIVAC / UNISYS mainframe master console this 2-token command stopped all processes running on the mainframe ...!

In this test mode more information was printed on the monitor console and the commands where ASCII coded, thus more bytes had to go over the serial comm line, but I could read the messages that would be sent to the simulation software and I could enter the messages from the simulation software to the console application and see the response, for example LEDs turning on and off.
To make a long story short, the communication between the console interface and the simulation software is ASCII. However, the [DEBUG] variable is checked when data must be communicated. When [DEBUG] = $00 one byte is sent as a binairy byte, and when [DEBUG] != $00 one byte is sent as two ASCII bytes (0..9 and A..F).

You can download the complete source software (debug monitor and console application, 6802 assembler) from here: 6802sim.zip  (version 31mar2004, 26 kbytes).  Note that this version is the almost final debugged version!
The software is developed with a cross-assembler that runs on any PC. I use the 6800/1/2/3 assembler that I downloaded from the   Simtel archives, but there are a few more out there. Since the assembler is freeware, you can get it also from here:  as02_130.zip  (49 kbytes).