The PaulOS Program Executable (PPE) and PaulOS Program Code (PPC) formats are the filetypes for PaulOS specific programs.

Currently, these are implimented outside of PaulOS in a text only context (for the PaulOS Console application). Windowing is not yet supported in the programs.

I have developed a number of test programs. The main one of which is the Convolued Test Program.


The Convoluted Test Program

Here is the source listing, as of 13th April, 2002:

(Filename: Test.ppc)

Convoluted Test program
1031
#Main "loop"
goto
welcome
label
2
goto
main
label
3
output
Storing a string in ram
stringstore
10
This is a test stored string
outputnl
This is the stored string:
outputstr
10
output

goto
morestores

label
bleh
goto
finish
label
4
END

#Welcome
label
welcome
clrout
output
This is a test PP
output
it probably won't work properly
goto
2

main
label
main
output

output
Now in main
output
wahoo
output

goto
3

#Finish
label
finish
output

output
finishing
goto
4


label
morestores
output
Doing more string tests, with overlapping strings
stringstore
900
The Quick Brown Fox Jumped over the Lazy Dog
stringstore
890
0123456789abcdef
outputstr
900
output

outputstr
890
output

outputstr
880
output

outputstr
910
output

output
And trying to store beyond the available space
stringstore
1020
going off the edge!
outputstr
1020
output

goto
bleh

Here's the HEX listing of the compiled code:

(filename: TEST.PPE)

ADDR 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15    0123456789ABCDEF

0000 50 61 30 30 31 20 20 43 6F 6E 76 6F 6C 75 74 65    Pa001  Convolute
0010 64 20 54 65 73 74 20 70 72 6F 67 72 61 6D 20 20    d Test program  
0020 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                    
0030 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                    
0040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                    
0050 20 20 20 20 20 20 20 07 04 00 00 01 CF 00 00 00           .....Ï...
0060 01 09 01 00 00 02 53 74 6F 72 69 6E 67 20 61 20    ......Storing a 
0070 73 74 72 69 6E 67 20 69 6E 20 72 61 6D 00 05 0A    string in ram...
0080 00 00 00 54 68 69 73 20 69 73 20 61 20 74 65 73    ...This is a tes
0090 74 20 73 74 6F 72 65 64 20 73 74 72 69 6E 67 00    t stored string.
00A0 04 54 68 69 73 20 69 73 20 74 68 65 20 73 74 6F    .This is the sto
00B0 72 65 64 20 73 74 72 69 6E 67 3A 00 06 0A 00 00    red string:.....
00C0 00 02 00 01 38 01 00 00 01 26 01 00 00 FE 03 02    ....8....&...þ..
00D0 54 68 69 73 20 69 73 20 61 20 74 65 73 74 20 50    This is a test P
00E0 50 00 02 69 74 20 70 72 6F 62 61 62 6C 79 20 77    P..it probably w
00F0 6F 6E 27 74 20 77 6F 72 6B 20 70 72 6F 70 65 72    on't work proper
0100 6C 79 00 01 61 00 00 00 02 00 02 4E 6F 77 20 69    ly..a......Now i
0110 6E 20 6D 61 69 6E 00 02 77 61 68 6F 6F 00 02 00    n main..wahoo...
0120 01 66 00 00 00 02 00 02 66 69 6E 69 73 68 69 6E    .f......finishin
0130 67 00 01 CE 00 00 00 02 44 6F 69 6E 67 20 6D 6F    g..Î....Doing mo
0140 72 65 20 73 74 72 69 6E 67 20 74 65 73 74 73 2C    re string tests,
0150 20 77 69 74 68 20 6F 76 65 72 6C 61 70 70 69 6E     with overlappin
0160 67 20 73 74 72 69 6E 67 73 00 05 84 03 00 00 54    g strings..„...T
0170 68 65 20 51 75 69 63 6B 20 42 72 6F 77 6E 20 46    he Quick Brown F
0180 6F 78 20 4A 75 6D 70 65 64 20 6F 76 65 72 20 74    ox Jumped over t
0190 68 65 20 4C 61 7A 79 20 44 6F 67 00 05 7A 03 00    he Lazy Dog..z..
01A0 00 30 31 32 33 34 35 36 37 38 39 61 62 63 64 65    .0123456789abcde
01B0 66 00 06 84 03 00 00 02 00 06 7A 03 00 00 02 00    f..„......z.....
01C0 06 70 03 00 00 02 00 06 8E 03 00 00 02 00 02 41    .p......Ž......A
01D0 6E 64 20 74 72 79 69 6E 67 20 74 6F 20 73 74 6F    nd trying to sto
01E0 72 65 20 62 65 79 6F 6E 64 20 74 68 65 20 61 76    re beyond the av
01F0 61 69 6C 61 62 6C 65 20 73 70 61 63 65 00 05 FC    ailable space..ü
0200 03 00 00 67 6F 69 6E 67 20 6F 66 66 20 74 68 65    ...going off the
0210 20 65 64 67 65 21 00 06 FC 03 00 00 02 00 01 C9     edge!..ü......É
0220 00 00 00 FE 00 00 00 00 00 00 00 00 00 00 00 00    ...þ............

Some screen shots of the interpreter runnning the program:


And here's the debug output from the interpreter, including a 'ramdump' of the 'processor'.

PPE runner/interpreter (32K version)

Pa001 Processor (not an emulator, THE processor) initialised

Screen setup in RAM
Done first screen refresh.

Opening program file: TEST.ppe
Program description:
Convoluted Test program                                                         
Memory required: 1031 bytes
## Press ENTER to start (CTRL+F12 terminates execution):
5C: OPCODE   1 (JUMP)  CF
CF: OPCODE   3 (CLROUT)
D0: OPCODE   2 (OUTPUT)  This is a test PP
E3: OPCODE   2 (OUTPUT)  it probably won't work properly
104: OPCODE   1 (JUMP)  61
61: OPCODE   1 (JUMP)  109
109: OPCODE   2 (OUTPUT)  
10B: OPCODE   2 (OUTPUT)  Now in main
118: OPCODE   2 (OUTPUT)  wahoo
11F: OPCODE   2 (OUTPUT)  
121: OPCODE   1 (JUMP)  66
66: OPCODE   2 (OUTPUT)  Storing a string in ram
7F: OPCODE   5 (STRINGSTORE)  A  This is a test stored string
A1: OPCODE   4 (OUTPUTNL)  This is the stored string:
BD: OPCODE   6 (OUTPUTSTR) A
C2: OPCODE   2 (OUTPUT)  
C4: OPCODE   1 (JUMP)  138
138: OPCODE   2 (OUTPUT)  Doing more string tests, with overlapping strings
16B: OPCODE   5 (STRINGSTORE)  384  The Quick Brown Fox Jumped over the Lazy Dog
19D: OPCODE   5 (STRINGSTORE)  37A  0123456789abcdef
1B3: OPCODE   6 (OUTPUTSTR) 384
1B8: OPCODE   2 (OUTPUT)  
1BA: OPCODE   6 (OUTPUTSTR) 37A
1BF: OPCODE   2 (OUTPUT)  
1C1: OPCODE   6 (OUTPUTSTR) 370
1C6: OPCODE   2 (OUTPUT)  
1C8: OPCODE   6 (OUTPUTSTR) 38E
1CD: OPCODE   2 (OUTPUT)  
1CF: OPCODE   2 (OUTPUT)  And trying to store beyond the available space
1FF: OPCODE   5 (STRINGSTORE)  3FC  going off the edge!
## ERROR! Attempt to access beyond allocated memory
##  Program will continue, but problems could occur
218: OPCODE   6 (OUTPUTSTR) 3FC
## ERROR! Reached end of RAM looking for string termination
##   Assuming string ends at end of ram. Execution continuing.
21D: OPCODE   2 (OUTPUT)  
21F: OPCODE   1 (JUMP)  C9
C9: OPCODE   1 (JUMP)  126
126: OPCODE   2 (OUTPUT)  
128: OPCODE   2 (OUTPUT)  finishing
133: OPCODE   1 (JUMP)  CE
CE: OPCODE 254 (END)
## Program terminated
### 464bytes of code.
### 38'processor' cycles used
### 0noops
### 100% efficiency rating
### .0546875 seconds to execute
###  694.8571428571429Hz
## If the last instruction was 253 (RESTART) and you wish to terminate the
## program, type QUIT to exit.
## Press ENTER to finish
Dumping RAM...
Pa001 Ram Dump for:
Convoluted Test program

Total bytes allocated: 1031

ADDR 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15    0123456789ABCDEF

0000 00 00 00 00 00 00 00 00 00 00 54 68 69 73 20 69    ..........This i
0010 73 20 61 20 74 65 73 74 20 73 74 6F 72 65 64 20    s a test stored 
0020 73 74 72 69 6E 67 00 00 00 00 00 00 00 00 00 00    string..........
0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
00F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
01A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
01B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
01C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
01D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
01E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
01F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0230 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0240 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0270 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0280 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0290 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
02A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
02B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
02C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
02D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
02E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
02F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0300 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0310 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0320 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0330 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0340 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0350 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0360 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0370 00 00 00 00 00 00 00 00 00 00 30 31 32 33 34 35    ..........012345
0380 36 37 38 39 61 62 63 64 65 66 00 63 6B 20 42 72    6789abcdef.ck Br
0390 6F 77 6E 20 46 6F 78 20 4A 75 6D 70 65 64 20 6F    own Fox Jumped o
03A0 76 65 72 20 74 68 65 20 4C 61 7A 79 20 44 6F 67    ver the Lazy Dog
03B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
03C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
03D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
03E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
03F0 00 00 00 00 00 00 00 00 00 00 00 00 67 6F 69 6E    ............goin
0400 67 20 6F 66 66 20 74                               g off t