Uit Hack42
Code for the pdp8/f
for this machine
this code is for the machine in the configuration we got it in.
OS8/SYKES Bootstrap Loader
Pasted on paper on the back of the pdp8 8/e 8/f 8/m Pocket Reference Card
Addr | instr | comment |
---|---|---|
0400 | 1230 | - |
0401 | 6321 | - |
0402 | 6321 | - |
0403 | 7600 | - |
0404 | 6322 | - |
0405 | 5204 | - |
0406 | 6324 | - |
0407 | 7106 | - |
0410 | 7006 | - |
0411 | 3233 | - |
0412 | 6322 | - |
0413 | 5212 | - |
0414 | 6324 | - |
0415 | 7012 | - |
0416 | 7012 | - |
0417 | 0217 | - |
0420 | 1233 | - |
0421 | 3132 | - |
0422 | 2332 | very faint.. |
0423 | 2331 | barely readable |
0424 | 5204 | - |
0425 | 1203 | - |
0426 | 6321 | - |
0427 | 5014 | faint could be 5017 |
0430 | 0401 | faint. |
0431 | ? | writing completely gone |
0432 | ? | writing completely gone |
code to dump the core of field 0 to a serial port
Bugblue version
There are some jumps because of faulty memory locations. that is why the start address is 176o.
*176 /LOCATE PROGRAM STARTING AT ADDR 200
CLA CLL /CLEAR ACCUMULATOR /CLEAR AC LINK
NOP // bad memory
DCA TMP1 /STORE THAT (0) IN TMP1
NOP // bad memory
MAIN, NOP
TAD TMP1 // load TMP1
JMS PRINTNUM // print dit nummer
CLA CLL
TAD SPACE
JMS TTYO // output to tty0
TAD I TMP1 // indirect laden van TMP1
JMS PRINTNUM // print dit nummer
TAD TMP1 // load TMP1
IAC // INCREMENT 1
DCA TMP1
TAD CR
JMS TTYO // output to tty0
CLA CLL
TAD LF
JMS TTYO // output to tty0
JMP MAIN // tada.wav
PRINTNUM, NOP
DCA TMP3 // store this in tmp3
TAD TMP3 // get it.
RAR
RTR
RTR
RTR
JMS STUK
NOP
HEEL, NOP
CLA CLL // clear AC
TAD TMP3 // load TMP3
RTR
RTR
RTR // 6 bitwise shift
JMS PLUS // xor met 0070
JMS TTYO // output to tty0
CLA CLL // clear AC
TAD TMP3 // load TMP3
RAR
RTR // 3 bitwise shift
JMS PLUS // xor met 0070
JMS TTYO // output to tty0
CLA CLL // clear AC
TAD TMP3 // load TMP3
JMS PLUS // xor met 0070
JMS TTYO // output to tty0
JMP I PRINTNUM
PLUS, NOP
AND AND7
TAD PLUS60
JMP I PLUS
TTYO, NOP /TTY OUTPUT ROUTINE. THE FIRST WORD OF
/A SUBROUTINE MUST BE EMPTY (0) BECAUSE
/THE JMS INSTRUCTION INSERTS THE RETURN
/ADDR IN THIS WORD.
6446 /WRITE AC TO THE OUTPUT DEVICE (TTY)
6441 /IF TTY IS READY, SKIP NEXT INSTRUCTION.
JMP .-1 /TTY IS NOT READY, SO CHECK AGAIN
CLA /CLEAR AC
NOP // Memory broken
JMP I TTYO /RETURN TO CALLER
PLUS60, 60
TMP1, 0
TMP3, 0
SPACE, 40
LF, 12
CR, 15
AND7, 7
NOP // Memory broken
STUK, NOP
RTR // 9 bitwise shift
JMS PLUS // xor met 0070
JMS TTYO // output to tty0
JMP HEEL
$
Rick Murphy version
Here's a dump program. It'll dump a field from (by default) location 0 to 7777. This is set up to dump field 1; change the CDF at location 206 to whatever field you want (CDF 20 is 6221; CDF 30 is 6231, etc.) Starting location is in PTR at 0221.
Note that OS/8 usually outputs ASCII with mark parity. That will confuse most modern systems. This code outputs with space parity. Tested on SIMH. Updates to avoid bad memory locations need to be made, of course.
0200 *200 //start address 000200 1221 LOOP, TAD PTR // Get the address 000201 4226 JMS PRINT // Print the address 000202 1222 TAD COLON // Output a space after the address 000203 4255 JMS TTYO 000204 1223 TAD SPACE 000205 4255 JMS TTYO 000206 6211 CDF 10 // Field 1 000207 1621 TAD I PTR // Get the value 000210 6201 CDF 0 // Restore field 000211 4226 JMS PRINT // Print it 000212 1224 TAD CR 000213 4255 JMS TTYO 000214 1225 TAD LF 000215 4255 JMS TTYO 000216 2221 ISZ PTR // Bump the pointer 000217 5200 JMP LOOP 000220 7402 HLT // Done 000221 0000 PTR, 0 // Start address 000222 0072 COLON, ": 000223 0040 SPACE, " 000224 0015 CR, 15 // Octal CR value[B 000225 0012 LF, 12 000226 0000 PRINT, .-. // Print a word 000227 3252 DCA SAVE // Word being printed - address or value 000230 1252 TAD SAVE 000231 7104 CLL RAL // Push one bit into the Link 000232 3252 DCA SAVE 000233 4240 JMS TTYNUM // Print one octal digit at a time 000234 4240 JMS TTYNUM 000235 4240 JMS TTYNUM 000236 4240 JMS TTYNUM 000237 5626 JMP I PRINT 000240 0000 TTYNUM, .-. 000241 1252 TAD SAVE 000242 7004 RAL 000243 7006 RTL // High order digit to low order word 000244 3252 DCA SAVE // Save state 000245 1252 TAD SAVE 000246 0253 AND SEVEN 000247 1254 TAD ZERO 000250 4255 JMS TTYO 000251 5640 JMP I TTYNUM 000252 0000 SAVE, 0 000253 0007 SEVEN, 7 000254 0060 ZERO, "0 000255 0000 TTYO, .-. 000256 6046 6046 000257 6041 6041 000260 5257 JMP .-1 000261 7200 CLA 000262 5655 JMP I TTYO