Uit Hack42
Ga naar: navigatie, zoeken
Regel 69: Regel 69:
 
|}
 
|}
  
 +
After a coredump we found in field 0 on address 0400 the whole code!
 +
 +
{| class="wikitable"
 +
|-
 +
! 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 || -
 +
|-
 +
| 0423 || 2331 || -
 +
|-
 +
| 0424 || 5204 || -
 +
|-
 +
| 0425 || 1203 || -
 +
|-
 +
| 0426 || 6321 || -
 +
|-
 +
| 0427 || 5014 || -
 +
|-
 +
| 0430 || 0401 || -
 +
|-
 +
| 0431 || 7400 || -
 +
|-
 +
| 0432 || 0000 || bad core? all fields on this adress read 0000
 +
|}
  
 
==== Ascii print on teletype ====
 
==== Ascii print on teletype ====

Versie van 19 mei 2015 22:37

Code for the pdp8/f

for this exact specimen

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

After a coredump we found in field 0 on address 0400 the whole code!

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 -
0423 2331 -
0424 5204 -
0425 1203 -
0426 6321 -
0427 5014 -
0430 0401 -
0431 7400 -
0432 0000 bad core? all fields on this adress read 0000

Ascii print on teletype

This is a simple test to see if serial communication is working at least one way. On our machine, the Teletype resides not on the standard address but on address 43/44

0003 7001   INC AC +1
0004 6446   Output char
0005 6441   if flag skip next
0006 5005   JMP 5
0007 5003   JPM 3

For the hightspeed serial card on adress 03/04 use the code below

0003 7001   INC AC +1
0004 6046   Output char
0005 6041   if flag skip next
0006 5005   JMP 5
0007 5003   JPM 3

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. We know this program is highly inefficient and much nicer written if you do understand what you are doing. But as it grew we don't like to toggle the whole program again. Hence the very ugly jumps and hacks.

0175 170176	        *176                    /LOCATE PROGRAM STARTING AT ADDR 200
0176 7300	        CLA CLL                 /CLEAR ACCUMULATOR /CLEAR AC LINK
0177 7000	        NOP // bad memory
0200 3273	        DCA TMP1                /STORE THAT (0) IN TMP1
0201 7000	        NOP // bad memory
0202 7000	MAIN,   NOP
0203 1273	        TAD TMP1                // load TMP1
0204 4223	        JMS PRINTNUM            // print dit nummer
0205 7300	        CLA CLL
0206 1275	        TAD SPACE
0207 4263	        JMS TTYO                // output to tty0
0210 4307	        JMS LAAD                // LOAD data field (change)
0211 4223	        JMS PRINTNUM            // print dit nummer
0212 1273	        TAD TMP1                // load TMP1
0213 7001	        IAC                     // INCREMENT 1
0214 3273	        DCA TMP1 
0215 1277	        TAD CR
0216 4263	        JMS TTYO                // output to tty0
0217 7300	        CLA CLL
0220 1276	        TAD LF
0221 4263	        JMS TTYO                // output to tty0
0222 5202	        JMP MAIN                // tada.wav
0223 7000	PRINTNUM, NOP
0224 3274	        DCA TMP3                // store this in tmp3
0225 1274	        TAD TMP3                // get it.
0226 7010	        RAR
0227 7012	        RTR
0230 7012	        RTR
0231 7012	        RTR
0232 4302	        JMS STUK
0233 7000	        NOP
0234 7000	HEEL,   NOP
0235 7300	        CLA CLL                 // clear AC
0236 1274	        TAD TMP3                // load TMP3
0237 7012	        RTR
0240 7012	        RTR
0241 7012	        RTR             // 6 bitwise shift
0242 4257	        JMS PLUS                // xor met 0070
0243 4263	        JMS TTYO                // output to tty0
0244 7300	        CLA CLL                 // clear AC
0245 1274	        TAD TMP3                // load TMP3
0246 7010	        RAR
0247 7012	        RTR                 // 3 bitwise shift
0250 4257	        JMS PLUS                // xor met 0070
0251 4263	        JMS TTYO                // output to tty0
0252 7300	        CLA CLL                 // clear AC
0253 1274	        TAD TMP3                // load TMP3
0254 4257	        JMS PLUS                // xor met 0070
0255 4263	        JMS TTYO                // output to tty0
0256 5623	        JMP I PRINTNUM
0257 7000	PLUS,   NOP
0260 0300		AND	AND7
0261 1272	        TAD     PLUS60
0262 5657	        JMP   I  PLUS
0263 7000	TTYO,   NOP                     /TTY OUTPUT ROUTINE. THE FIRST WORD OF
0264 6446	        6446                    /WRITE AC TO THE OUTPUT DEVICE (TTY)
0265 6441	        6441                    /IF TTY IS READY, SKIP NEXT INSTRUCTION.
0266 5265	        JMP .-1                 /TTY IS NOT READY, SO CHECK AGAIN
0267 7200	        CLA                     /CLEAR AC
0270 7000	        NOP // Memory broken
0271 5663	        JMP I TTYO              /RETURN TO CALLER
0272 0060	PLUS60, 60
0273 0000	TMP1,   0
0274 0000	TMP3,   0
0275 0040	SPACE,  40
0276 0012	LF,     12
0277 0015	CR,     15
0300 0007	AND7,   7
0301 7000	        NOP // Memory broken
0302 7000	STUK, NOP
0303 7012	        RTR             // 9 bitwise shift
0304 4257	        JMS PLUS                // xor met 0070
0305 4263	        JMS TTYO                // output to tty0
0306 5234	JMP HEEL
0307 7000	LAAD, NOP
0310 1273	        TAD TMP1
0311 1001	        TAD 1
0312 7450	        SNA
0313 7402	        HLT
0314 6211	        6201 10                 // CDF 10
0315 1673	        TAD I TMP1              // indirect laden van TMP1
0316 6210	        6210  0                 // CDF 0
0317 5707	        JMP I LAAD
	$

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


Orginele code op MM8-EJ field 0 vanaf adres 200

3160
1545
3151
6141
3440
0040
3162
1557
3545
1563
3151
3556
1056
0040
3516
1157
3155
6141
1154
0171
3141
6154
2440
1501
2103
4511
3040 0232
4143
3141
0562
3143
2564
0162
0163
1015
0012
1040
0040
1040
0040 0247
3440
3440
3151
4164
3040
7543
1144
0145
1460
0060
1456 0262