Philips/P800 simulator
Preliminary Version of the Simulator Manual - Fil:Manual.pdf
This is a graphical representation of the Customer Operating Panel (top) and the Systems Operators Panel of the P800 series.
The P800 did not support a screen as we know it today, so it used a CUSOP for end-user communication. If the program wanted some information on how to proceed, it could light up some lamps (or LEDs in later versions). The operator could then consult his user manual, and press the relevant buttons. In the simulator, the CUSOP is used to select which program to run, but more on that later.
The SOP is a different cup of tea.
It gives access to everything within the system, so you can display and change the contents of words, you can interrupt the program and restart somewhere else, etc.
So, you have complete control.
We will now look at the SOP in detail.
There are 4 major parts :
- the simulated 4 x 4 LED's
- the corresponding 4 x 4 toggle switches
- the 4 toggle switches adressing (in binary) the 16 internal registers
- the push buttons
We take the pushbuttons first :
- MC - master clear : resets everything to zero;
- RST - in the P800 this button displays (in the 4 x 4 leds) the status word, but this is not really relevant in a simulator;
- RR - Read Register : display the register as addressed by the 4 right hand toggle switches;
- RM - Read Memory : when we want to inspect the contents of a memory word, we first need to set up the addres on the toggle switches. So, if you want to look at the contents of addres /0133, you change the switches to 0000 0001 0011 0011, where 0 means down, and 1 means up. Pressing RM, will reveal the contents of the word on the LEDs above the switches;
- LR - Load Register : the reverse of RR;
- LM - Load Memory : the reverse of RM
- IPL - Initial Program Load : where it loads the initial program from, is hardware defined. Normally a floppy disc, an ECMA34 data cassette or a harddisc.
- INST - Instruction : mainly used for debugging programs. It will execute one instruction at a time;
- RUN - RUN : used directly after IPL or after INST;
- INT - Interrupt : pressing the button will halt the program. Used for debugging or when the programmer has done something that leads to unwanted actions.
Pressing the PTS6800 panel (which is just a label on a real P800) will show a Philips logo and some text.
Pressing the PHILIPS panel (which also is just a label on a P800), will show some Programmer Notes.
Now we want to start doing something with the simulator.
We can press IPL either on the SOP or the CUSOP. The CUSOP will normally be preferred, as it will display a list of available programs. The programs are the result of source programs created by the Assembler.
The fact that you can see 11 LED's, shows that there are at least 11 executable programs "on hand".
A normal end-user would now press the button belonging to the program he wants to run, and then he would not have to act again until some special condition occured. We will therefore now concentrate on using the SOP.
When we press IPL on the SOP, we will not see the programlist as described above, but we will see a number of lit-up LEDS. When we move the cursor to a white button, we will see which program is assigned to this button.
Suppose that we want to run the program assigned to button 5, which in this case is FLOP1.
Hitting the button will not do anything, as the program as such is not started. It is just loaded. To get it running, you must press INST or RUN.
INST will open quite a lot of windows, in fact so many that we have to discuss them one at a time.
Form11 - Trace / debug Window
- - - - - - - - - - - - - - -
This window shows in fact the .LST file generated by the Assembler.
Form3 - Registers and other variables
- - - - - - - - - - - - - - - - - - -
Here you can see the contents of the registers and other variables. You will see many standard names which you will recognise from the Assembler, so there is no need to go into much detail.
Now note the following :
- the listing shows a blue line over the first line with object code, in this case address /0084.
- now look at the form showing registers : here you will see the same address in the P register. This is not so strange, as P is the program counter, showing the address of the next instruction to be executed.
- now look at the LEDS on the SOP : it will display the INSTRUCTION : /0141
We still have some very useful forms to consider, without which it would be very difficult to debug a program :
- Inspect/modify addresses : this is a shortcut to inspect and/or modify any address. You can also press NEXT to inspect a number of successive words. You can also change the contents by writing the hexadecimal value /xxxx into the lower edit field.
- Debug functions :
This form is to be used only by experienced programmers.
First we take the TRAP group of instructions.
when you want to stop execution at a certain address, for example to inspect the contents of a counter, you can set a TRAP at that position. The program will then halt, so you can inspect the counter. A TRAP can also be removed, and you can proceed to the next TRAP.
Having set a trap (or removed it) will show up in the program listing with a T between the object code and the source text.
Sometimes it is necessary to ignore an instruction. This can be done through "Change instruction to NO-OP's".
A NO-OP is a dummy instruction, in this case loading A1 with the contents of A1.
Related to this function is the "Reestablish Instruction". This will reestablish the instruction you NO-OP'ped with its original contents.
"Jump to specific line" can be used when you want to go somewhere else. It is in fact just a modification of the Program Counter.
To end this part, we have the "Reset All Traps / NO-OP's" which does exactly what it says.
When you now press INST, the first instruction will be executed.
The P register will now point at the next instruction, and a number of other fields are changed.
For example will the LK field contain the next instruction. And why is that? The reason is that the referenced word, in this case the address of the next instruction, is seen as undefined data. So, as the standard word LK (long constant) is defined as the word following the present instruction, it will display the next instruction as if it were a long constant.
The same is valid for e.g. the field MD, which is a Mode Definition. This is explained in the P800 P800 Insgtruction set, but basically it is a way of jamming different instructions into the same word. You will get used to it when programming in Assembler.
Have fun using the Simulator; it is never too late to learn a new language.