LINCtape images
Jay Jaeger
cube1 at charter.net
Tue Nov 2 16:25:47 CDT 2021
On 10/29/2021 7:22 AM, Christian Corti via cctalk wrote:
> Short question:
> How do I transfer LINCtape images back to tape on a PDP-12? Ideally
> there is some binary program to load via papertape to format a tape and
> recreate it with data transfer over the console serial line.
>
> Christian
Here is a program I wrote for reading/writing tape images via XModem
protocol for my PDP-12, and another for comparing two linctapes.
JRJ
8L OF XMTAPE PAGE 01
LN=0001
0001 [ PROGRAM TO SEND A
0002 [ TAPE ON UNIT 1 TO
0003 [ A PC VIA XMODEM
0004 [
0005 [ CONSTANTS
0006 [
0007 XSOH=1
0010 XNAK=25
0011 XCAN=30
0012 XACK=6
0013 XEOT=4
0014 SRTAPE=1 [ SR11 1 FOR OS/12 TAPE
0015 SRCMP=2 [ SR10 1 FOR COMPARE
0016 SRWRIT=4 [ SR9 1 FOR WRITE
0017 [
0020 [ SPECIAL INSTRUCTIONS
0021 [
0022 AXO=1
0023 PDP=2
0024 TMA=23
0025 RDC=700
0026 WDE=706
0027 DKSF=6401
0030 DKCC=6402
0031 DKRB=6406
0032 DTLS=6416
0033 DTSF=6411
0034 [
0035 [ DATA
0036 [
0037 $70
0040 0070 0000 #XMPTR 0 [ PTR INTO XMBUF
0041 0071 0000 #XMBLK 0 [ XMODEM BLOCK #
0042 0072 0000 #XMCKSM 0 [ XMODEM CHECKSUM
0043 0073 0000 #XMCNT 0 [ WORK COUNTER
0044 0074 0000 #XMACK 0 [ ACKNOWLEDGEMENT CHAR
0045 0075 0000 #ROTCNT 0 [ WORK COUNTER FOR RAR
0046 0076 0000 #WDCNTI 0 [ WORDS PER BLOCK
0047 0077 0000 #BLKCNT 0 [ BLOCKS PER TAPE
0050 0100 0000 #WDCNT 0 [ WORK COUNTER
0051 0101 0000 #HNKCNT 0 [ WORK COUNTER
0052 0102 0000 #HNKMEM 0 [ ADDRESS OF BLOCK
0053 0103 0000 #XMWORD 0 [ XMODEM INCOMING WORD
0054 0104 0000 #XMPROT 0 [ XMODEM PROTOCOL CHAR
0055 [
0056 [ INITIALIZATION
0057 [
0060 $200
0061 0200 7402 #START HLT
0062 0201 7301 CLA CLL IAC [ XMODEM BLOCK=1
0063 0202 3071 0071 DCA XMBLK
0064 0203 1177 1155 TAD (XMBUF [ XMPTR = ADDR(XMBUF)
0065 0204 3070 0070 DCA XMPTR
0066 0205 1176 7600 TAD (0-128. [ XMCNT = -128
0067 0206 3073 0073 DCA XMCNT
8L OF XMTAPE PAGE 02
LN=0070
0070 0207 7404 OSR [ IF SR11 == 0 THEN
0071 0210 0175 0001 AND (SRTAPE
0072 0211 7440 SZA
0073 0212 5220 0220 JMP INITP
0074 0213 1174 7400 TAD (0-256. [ WDCNTI= -256.
0075 0214 3076 0076 DCA WDCNTI
0076 0215 1173 7000 TAD (0-1000 [ BLKCNT = -01000
0077 0216 3077 0077 DCA BLKCNT
0100 0217 5225 0225 JMP INIT1 [ ELSE
0101 0220 7300 #INITP CLA CLL
0102 0221 1172 7577 TAD (0-129. [ WDCNTI = -129.
0103 0222 3076 0076 DCA WDCNTI
0104 0223 1171 5000 TAD (0-3000 [ BLKCNT = - 03000
0105 0224 3077 0077 DCA BLKCNT
0106 0225 3254 0254 #INIT1 DCA BLOCK [ BLOCK = 0
0107 0226 7404 OSR [ IF SR10==1 THEN COMPARE
0110 0227 0170 0002 AND (SRCMP
0111 0230 7440 SZA
0112 0231 5567 0500 JMP CMPINI [ GO COMPARE
0113 0232 7404 OSR [ IF SR9==1 THEN WRITE
0114 0233 0166 0004 AND (SRWRIT
0115 0234 7440 SZA
0116 0235 5565 0603 JMP WTINI [ GO WRITE
0117 [
0120 [ READ NEXT HUNK (1 FIELD)
0121 [ (16 BLOCKS) INTO MEM.
0122 [
0123 0236 7300 #RDHNK CLA CLL
0124 0237 1164 7760 TAD (0-16. [ HNKCNT = -16.
0125 0240 3101 0101 DCA HNKCNT
0126 0241 3102 0102 DCA HNKMEM [ HNKMEM = 0
0127 0242 7300 #RDBLK CLA CLL
0130 0243 1102 0102 TAD HNKMEM [ TMA MEMORY ADDRESS
0131 0244 6141 LINC
0132 0245 0023 TMA
0133 0246 0002 PDP
0134 0247 7300 CLA CLL [ EXTENDED, FIELD 1
0135 0250 1163 1020 TAD (1020
0136 0251 6141 LINC
0137 0252 0001 AXO
0140 0253 0710 RDC 10 [ READ UNIT 1
0141 0254 0000 #BLOCK 0
0142 0255 0002 PDP
0143 0256 2254 0254 ISZ BLOCK [ ++BLOCK
0144 0257 7300 CLA CLL
0145 0260 1102 0102 TAD HNKMEM [ HNKMEM += 256.
0146 0261 1162 0400 TAD (256. [ EVEN FOR 129. WORD
0147 0262 3102 0102 DCA HNKMEM [ SIMULATED DECTAPES
0150 0263 2101 0101 ISZ HNKCNT [ WHILE ++HNKCNT != 0
0151 0264 5242 0242 JMP RDBLK
0152 [
0153 [ FILL XMODEM BUFFER
0154 [ 1 WORD AT A TIME.
0155 [ TRANSMIT AS NECESSARY
0156 [
8L OF XMTAPE PAGE 03
LN=0157
0157 0265 7300 CLA CLL
0160 0266 1164 7760 TAD (0-16. [ HNKCNT = -16.
0161 0267 3101 0101 DCA HNKCNT
0162 0270 3102 0102 DCA HNKMEM [ MEMORY ADDR=0
0163 0271 7300 #HNKSND CLA CLL
0164 0272 1076 0076 TAD WDCNTI [ WDCNT = WDCNTI
0165 0273 3100 0100 DCA WDCNT [ (- WORD COUNT)
0166 0274 6211 #HNKNXW CDF 10 [ FIELD 1 HOLDS DATA
0167 0275 1502 0102 TAD;HNKMEM [ AC=WORD
0170 0276 6201 CDF 0 [ BACK TO NORMAL
0171 0277 4330 0330 JMS WDSEND [ PUT WORD IN BUFF
0172 0300 2102 0102 ISZ HNKMEM [ POINT TO NEXT WD
0173 0301 7000 NOP [ FOR SKIP ON ZERO
0174 0302 2100 0100 ISZ WDCNT [ UNTIL ++WDCNT == 0
0175 0303 5274 0274 JMP HNKNXW
0176 0304 7300 CLA CLL
0177 0305 1076 0076 TAD WDCNTI [ BUMP MEM ADDR TO
0200 0306 1162 0400 TAD (256. [ NEXT BLOCK. DOES
0201 0307 1102 0102 TAD HNKMEM [ NOTHING IF BLOCK
0202 0310 3102 0102 DCA HNKMEM [ SIZE IS 256.
0203 0311 2101 0101 ISZ HNKCNT [ UNTIL ++HNKCNT == 0
0204 0312 5271 0271 JMP HNKSND
0205 [
0206 [ IF WE HAVE SENT THEM
0207 [ ALL, FLUSH THE BUFFER
0210 [ AND HALT. OTHERWISE
0211 [ GO BACK FOR MORE
0212 [
0213 0313 7300 CLA CLL
0214 0314 1077 0077 TAD BLKCNT [ BLKCNT += 16.
0215 0315 1161 0020 TAD (16.
0216 0316 3077 0077 DCA BLKCNT
0217 0317 1077 0077 TAD BLKCNT
0220 0320 7440 SZA [ UNTIL BLKCNT == 0
0221 0321 5236 0236 JMP RDHNK
0222 0322 4361 0361 JMS WDFLSH [ FLUSH THE BUFFER
0223 0323 7300 CLA CLL
0224 0324 1166 0004 TAD (XEOT [ SEND EOT CHAR
0225 0325 4560 0466 JMS CHSEND
0226 0326 7402 HLT [ AND HALT
0227 0327 5200 0200 JMP START
0230 [
0231 [ SUBROUTINE TO PUT A
0232 [ WORD INTO XMODEM
0233 [ BUFFER AND TRIGGER
0234 [ A TRANSMISSION IF
0235 [ THE BUFFER IS FULL
0236 [
0237 0330 0000 #WDSEND 0 [ RETURN ADDRESS
0240 0331 3470 0070 DCA;XMPTR [ STORE LOW 8 BITS
0241 0332 1157 7770 TAD (0-8.
0242 0333 3075 0075 DCA ROTCNT
0243 0334 1470 0070 TAD;XMPTR [ RESTORE DATA WORD
0244 0335 7110 #WDROT CLL RAR [ AC >>= 8.
0245 0336 2075 0075 ISZ ROTCNT
8L OF XMTAPE PAGE 04
LN=0246
0246 0337 5335 0335 JMP WDROT
0247 0340 2070 0070 ISZ XMPTR [ ++ XMPTR
0250 0341 7000 NOP [ FOR SKIP
0251 0342 3470 0070 DCA;XMPTR [ STORE HIGH 4 BITS
0252 0343 2070 0070 ISZ XMPTR [ ++ XMPTR
0253 0344 7000 NOP [ FOR SKIP
0254 0345 2073 0073 ISZ XMCNT
0255 0346 2073 0073 ISZ XMCNT
0256 0347 5730 0330 JMP;WDSEND [ RTRN IF NOT FULL
0257 0350 4562 0400 JMS XMSEND [ ELSE SEND BUFFER
0260 0351 7300 CLA CLL [ RE-INITIALIZE
0261 0352 1177 1155 TAD (XMBUF [ XMPTR = ADDR(XMBUF)
0262 0353 3070 0070 DCA XMPTR
0263 0354 1176 7600 TAD (0-128. [ XMCNT = -128.
0264 0355 3073 0073 DCA XMCNT
0265 0356 2071 0071 ISZ XMBLK [ ++XMBLK (XMODEM BLOCK)
0266 0357 7000 NOP [ FOR SKIP
0267 0360 5730 0330 JMP;WDSEND [ AND RETURN
0270 [
0271 [ SUBROUTINE TO FLUSH
0272 [ AND AND SEND XMODEM
0273 [ BUFFER
0274 [
0275 0361 7300 #WDFLSH CLA CLL
0276 0362 1073 0073 TAD XMCNT [ IF COUNT==128.
0277 0363 1176 7600 TAD (0-128.
0300 0364 7450 SNA
0301 0365 5761 0361 JMP;WDFLSH [ THEN JUST RETURN
0302 0366 7300 #WDFILL CLA CLL
0303 0367 3470 0070 DCA;XMPTR [ STUFF A 0 BYTE
0304 0370 2070 0070 ISZ XMPTR [ ++XMPTR
0305 0371 7000 NOP [ FOR SKIP
0306 0372 2073 0073 ISZ XMCNT [ UNTIL ++XMCNT == 0
0307 0373 5366 0366 JMP WDFILL
0310 0374 5761 0361 JMP;WDFLSH [ RETURN WHEN DONE
0311 [
0312 [ SUBROUTINE TO SEND
0313 [ AN XMODEM MESSAGE,
0314 [ WITH RETRIES
0315 [
0316 $400
0317 0400 0000 #XMSEND 0 [ RETURN ADDRESS
0320 0401 4225 0425 JMS XMPUT [ TRY AND SEND
0321 0402 4273 0473 JMS CHGET [ GET ACKNOWLEDGEMENT
0322 0403 0156 0077 AND (77 [ FOR TESTING CONV.
0323 0404 3074 0074 DCA XMACK [ SAVE IT FOR LATER
0324 0405 1074 0074 TAD XMACK [ GET IT BACK
0325 0406 1155 7753 TAD (0-XNAK [ IF == NAK
0326 0407 7450 SNA
0327 0410 5201 0401 JMP XMSEND+1 [ THEN RETRY
0330 0411 7300 CLA CLL
0331 0412 1074 0074 TAD XMACK
0332 0413 1154 7750 TAD (0-XCAN [ IF == CANCEL
0333 0414 7440 SZA
0334 0415 5217 0417 JMP XMSND1
8L OF XMTAPE PAGE 05
LN=0335
0335 0416 5553 0201 JMP START+1 [ JUST RESTART
0336 0417 7300 #XMSND1 CLA CLL [ ELSE
0337 0420 1074 0074 TAD XMACK
0340 0421 1152 7772 TAD (0-XACK [ IF != ACK
0341 0422 7440 SZA
0342 0423 5201 0401 JMP XMSEND+1 [ RETRY
0343 0424 5600 0400 JMP;XMSEND [ ACK -- RETURN
0344 [
0345 [ SUBROUTINE TO SEND
0346 [ XMODEM BUFFER 1 TIME
0347 [
0350 0425 0000 #XMPUT 0 [ RETURN ADDRESS
0351 0426 7300 CLA CLL
0352 0427 1175 0001 TAD (XSOH [ TRANSMIT SOH
0353 0430 4266 0466 JMS CHSEND
0354 0431 7300 CLA CLL
0355 0432 1071 0071 TAD XMBLK [ TRANSMIT BLOCK NO.
0356 0433 4266 0466 JMS CHSEND
0357 0434 7300 CLA CLL
0360 0435 1071 0071 TAD XMBLK
0361 0436 7040 CMA [ TRANSMIT COMPLEMENT
0362 0437 4266 0466 JMS CHSEND
0363 0440 7300 CLA CLL
0364 0441 3072 0072 DCA XMCKSM [ XMCKSM = 0
0365 0442 1176 7600 TAD (0-128. [ XMCNT = -128.
0366 0443 3073 0073 DCA XMCNT
0367 0444 1177 1155 TAD (XMBUF [ XMPTR = ADDR(XMBUF)
0370 0445 3070 0070 DCA XMPTR
0371 0446 7300 #XMSPUT CLA CLL [ SEND *XMPTR
0372 0447 1470 0070 TAD;XMPTR
0373 0450 4266 0466 JMS CHSEND
0374 0451 7300 CLA CLL [ XMCKSM += *XMPTR
0375 0452 1470 0070 TAD;XMPTR
0376 0453 1072 0072 TAD XMCKSM
0377 0454 3072 0072 DCA XMCKSM
0400 0455 2070 0070 ISZ XMPTR [ ++XMPTR
0401 0456 7000 NOP [ FOR SKIP
0402 0457 2073 0073 ISZ XMCNT [ UNTIL ++XMCNT == 0
0403 0460 5246 0446 JMP XMSPUT
0404 0461 6402 DKCC [ PREPARE FOR ACK CHAR
0405 0462 7300 CLA CLL [ SEND CHECKSUM
0406 0463 1072 0072 TAD XMCKSM
0407 0464 4266 0466 JMS CHSEND
0410 0465 5625 0425 JMP;XMPUT [ AND RETURN
0411 [
0412 [ ROUTINE TO SEND CHAR
0413 [
0414 0466 0000 #CHSEND 0 [ RETURN ADDRESS
0415 0467 6416 DTLS [ SEND THE CHAR
0416 0470 6411 DTSF [ CHECK FLAG
0417 0471 5270 0470 JMP *-1 [ WAIT TILL DONE
0420 0472 5666 0466 JMP;CHSEND
0421 [
0422 [ ROUTINE TO WAIT FOR
0423 [ AND RECEIVE A CHAR
8L OF XMTAPE PAGE 06
LN=0424
0424 [
0425 0473 0000 #CHGET 0 [ RETURN ADDRESS
0426 0474 6401 DKSF [ WAIT FOR CHAR
0427 0475 5274 0474 JMP *-1
0430 0476 6406 DKRB [ RECEIVE THE CHAR
0431 0477 5673 0473 JMP;CHGET [ AND RETURN
0432 [
0433 [ COMPARE INCOMING DATA
0434 [ TO TAPE DRIVE 1
0435 [
0436 0500 7300 #CMPINI CLA CLL
0437 0501 3323 0523 DCA CMPBLK [ CMPBLK = 0
0440 0502 3073 0073 DCA XMCNT [ INIT XM BUFFER EMPTY
0441 0503 1151 0025 TAD (XNAK [ PRIME INITAL NACK
0442 0504 3074 0074 DCA XMACK
0443 [
0444 [ COMPARE NEXT HUNK
0445 [
0446 0505 7300 #CMPHNK CLA CLL
0447 0506 1164 7760 TAD (0-16. [ HNKCNT = -16
0450 0507 3101 0101 DCA HNKCNT
0451 0510 3102 0102 DCA HNKMEM [ HNKMEM = 0
0452 0511 7300 #CMPRB CLA CLL [ READ NEXT BLOCK
0453 0512 1102 0102 TAD HNKMEM [ GET MEM ADDR
0454 0513 6141 LINC
0455 0514 0023 TMA
0456 0515 0002 PDP
0457 0516 7300 CLA CLL
0460 0517 1163 1020 TAD (1020 [ XA MODE, FIELD 1
0461 0520 6141 LINC
0462 0521 0001 AXO
0463 0522 0710 RDC 10 [ READ UNIT 1
0464 0523 0000 #CMPBLK 0 [ BLOCK NUMBER
0465 0524 0002 PDP
0466 0525 2323 0523 ISZ CMPBLK [ ++CMPBLK
0467 0526 7300 CLA CLL
0470 0527 1102 0102 TAD HNKMEM [ HNKMEM += 256
0471 0530 1162 0400 TAD (256. [ EVEN FOR 129 WORD
0472 0531 3102 0102 DCA HNKMEM [ BLOCK TAPES
0473 0532 2101 0101 ISZ HNKCNT [ WHILE ++HNKCNT != 0
0474 0533 5311 0511 JMP CMPRB [ GO READ NEXT BLK
0475 [
0476 [ THEN COMPARE WHAT WE
0477 [ JUST READ TO INCOMING
0500 [ DATA FROM XMODEM
0501 [
0502 0534 7300 CLA CLL
0503 0535 1164 7760 TAD (0-16. [ HNKCNT = -16.
0504 0536 3101 0101 DCA HNKCNT
0505 0537 3102 0102 DCA HNKMEM [ HNKMEM = 0
0506 0540 7300 #CMPCBK CLA CLL
0507 0541 1076 0076 TAD WDCNTI [ WDCNT = WDCNTI
0510 0542 3100 0100 DCA WDCNT
0511 0543 4550 1000 #CMPCWD JMS RDWD [ GET WORD FROM XMODEM
0512 0544 7041 CMA IAC [ AC = -AC
8L OF XMTAPE PAGE 07
LN=0513
0513 0545 6211 CDF 10 [ COMPARE TO DATA
0514 0546 1502 0102 TAD;HNKMEM [ FROM TAPE
0515 0547 6201 CDF 0
0516 0550 7440 SZA [ COMPARE OK
0517 0551 7402 HLT [ MIS-COMPARE!!!
0520 0552 2102 0102 ISZ HNKMEM [ POINT TO NEXT WORD
0521 0553 7000 NOP [ FOR SKIP
0522 0554 2100 0100 ISZ WDCNT [ UNTIL ++WDCNT == 0
0523 0555 5343 0543 JMP CMPCWD [ GO COMPARE NEXT WD
0524 0556 7300 CLA CLL [ BUMP UP TO NEXT
0525 0557 1076 0076 TAD WDCNTI [ BLOCK. DOES NOTHING
0526 0560 1162 0400 TAD (256. [ FOR 256. WORD BLOCKS
0527 0561 1102 0102 TAD HNKMEM
0530 0562 3102 0102 DCA HNKMEM
0531 0563 2101 0101 ISZ HNKCNT [ UNTIL ++HNKCNT == 0
0532 0564 5340 0540 JMP CMPCBK [ GO COMPARE NEXT BLOCK
0533 [
0534 [ IF WE COMPARED IT ALL, HALT
0535 [
0536 0565 7300 CLA CLL
0537 0566 1077 0077 TAD BLKCNT [ BLKCNT += 16
0540 0567 1161 0020 TAD (16.
0541 0570 3077 0077 DCA BLKCNT
0542 0571 1077 0077 TAD BLKCNT [ RESTORE AC
0543 0572 7440 SZA
0544 0573 5305 0505 JMP CMPHNK [ MORE TO COMPARE
0545 0574 1147 0006 TAD (XACK [ ACK FINAL BLOCK
0546 0575 4266 0466 JMS CHSEND
0547 0576 7300 CLA CLL
0550 0577 1147 0006 TAD (XACK
0551 0600 4560 0466 JMS CHSEND
0552 0601 7402 HLT [ HALT, THEN RESTART
0553 0602 5553 0201 JMP START+1 [ SKIP INIT HLT
0554 [
0555 [ WRITE TAPE FROM INCOMING DATA
0556 [
0557 0603 7402 #WTINI HLT [ FOR SAFETY
0560 0604 7300 CLA CLL
0561 0605 3253 0653 DCA WTBLOK [ WTBLOK = 0
0562 0606 3073 0073 DCA XMCNT [ INIT XMODEM BUF EMPTY
0563 0607 1151 0025 TAD (XNAK [ PRIME INITIAL NACK
0564 0610 3074 0074 DCA XMACK
0565 0611 7300 #WTGHNK CLA CLL [ HNKCNT = -16.
0566 0612 1164 7760 TAD (0-16.
0567 0613 3101 0101 DCA HNKCNT
0570 0614 3102 0102 DCA HNKMEM [ HNKMEM = 0
0571 0615 7300 #WTGBK CLA CLL
0572 0616 1076 0076 TAD WDCNTI [ WDCNT = -WORDS/BLOCK
0573 0617 3100 0100 DCA WDCNT
0574 0620 4550 1000 #WTGWD JMS RDWD [ GET WORD FROM XMODEM
0575 0621 6211 CDF 10
0576 0622 3502 0102 DCA;HNKMEM [ STORE IN TAPE BUFF
0577 0623 6201 CDF 0
0600 0624 2102 0102 ISZ HNKMEM [ ++HNKMEM
8L OF XMTAPE PAGE 08
LN=0601
0601 0625 7000 NOP [ FOR SKIP
0602 0626 2100 0100 ISZ WDCNT [ UNTIL ++WDCNT == 0
0603 0627 5220 0620 JMP WTGWD
0604 0630 1076 0076 TAD WDCNTI [ BUMP TO NEXT BLOCK
0605 0631 1162 0400 TAD (256. [ HNKMEM += 256-BLKSIZE
0606 0632 1102 0102 TAD HNKMEM
0607 0633 3102 0102 DCA HNKMEM
0610 0634 2101 0101 ISZ HNKCNT [ UNTIL ++HNKCNT == 0
0611 0635 5215 0615 JMP WTGBK
0612 0636 1164 7760 TAD (0-16. [ HNKCNT = -16.
0613 0637 3101 0101 DCA HNKCNT
0614 0640 3102 0102 DCA HNKMEM [ HNKMEM = 0
0615 0641 7300 #WTBLK CLA CLL
0616 0642 1102 0102 TAD HNKMEM [ TMA MEMORY ADDR
0617 0643 6141 LINC
0620 0644 0023 TMA
0621 0645 0002 PDP
0622 0646 7300 CLA CLL
0623 0647 1163 1020 TAD (1020 [ XA MODE, FIELD 1
0624 0650 6141 LINC
0625 0651 0001 AXO
0626 0652 0716 WDE 10 [ WRITE TAPE BLOCK
0627 0653 0000 #WTBLOK 0
0630 0654 0002 PDP
0631 0655 2253 0653 ISZ WTBLOK [ ++WTBLOK
0632 0656 7300 CLA CLL
0633 0657 1102 0102 TAD HNKMEM [ HNKMEM += 256.
0634 0660 1162 0400 TAD (256. [ EVEN FOR 129 WD
0635 0661 3102 0102 DCA HNKMEM [ BLOCKS
0636 0662 2101 0101 ISZ HNKCNT [ UNTIL ++HNKCNT == 0
0637 0663 5241 0641 JMP WTBLK
0640 [
0641 [ IF ALL HUNKS WRITTEN
0642 [ THEN HALT
0643 [
0644 0664 7300 CLA CLL
0645 0665 1077 0077 TAD BLKCNT [ BLKCNT += BLOCKS/HUNK
0646 0666 1161 0020 TAD (16.
0647 0667 3077 0077 DCA BLKCNT
0650 0670 1077 0077 TAD BLKCNT
0651 0671 7440 SZA
0652 0672 5211 0611 JMP WTGHNK [ GO DO NEXT HUNK
0653 0673 1147 0006 TAD (XACK [ ACK FINAL BLOCK
0654 0674 4560 0466 JMS CHSEND
0655 0675 7300 CLA CLL
0656 0676 1147 0006 TAD (XACK
0657 0677 4560 0466 JMS CHSEND
0660 0700 7402 HLT [ THEN HALT -- WELL DONE!
0661 0701 5553 0201 JMP START+1 [ SKIP INITIAL HALT
0662 [
0663 [ ROUTINE TO RECEIVE
0664 [ A WORD FROM XMODEM
0665 [
0666 $1000
0667 1000 0000 #RDWD 0 [ RETURN ADDR
8L OF XMTAPE PAGE 09
LN=0670
0670 1001 7300 CLA CLL
0671 1002 1073 0073 TAD XMCNT [ IF BUFFER IS EMPTY
0672 1003 7440 SZA
0673 1004 5216 1016 JMP RDWD2 [ BUFFER NOT EMPTY
0674 1005 4237 1037 JMS XMGET [ GO FILL BUFFER
0675 1006 7450 SNA [ SKIP IF EOT
0676 1007 5212 1012 JMP RDWD1 [ NOT EOT -- OK
0677 1010 7402 HLT [ EOT - NOT EXPECTED
0700 1011 5210 1010 JMP *-1 [ HARD HALT
0701 1012 1177 1155 #RDWD1 TAD (XMBUF [ XMPTR = ADDR(XMBUFF)
0702 1013 3070 0070 DCA XMPTR
0703 1014 1176 7600 TAD (0-128. [ XMCNT = -128.
0704 1015 3073 0073 DCA XMCNT
0705 1016 7300 #RDWD2 CLA CLL [ CLEAR AC
0706 1017 1470 0070 TAD;XMPTR [ WORD = *XMPTR
0707 1020 3103 0103 DCA XMWORD [ SAVE IT
0710 1021 2070 0070 ISZ XMPTR [ ++XMPTR
0711 1022 7000 NOP [ FOR SKIP
0712 1023 1470 0070 TAD;XMPTR [ GET NEXT CHAR
0713 1024 2070 0070 ISZ XMPTR [ ++XMPTR
0714 1025 7000 NOP [ FOR SKIP
0715 1026 7012 RTR [ >>= 2
0716 1027 7012 RTR [ >>= 2
0717 1030 7010 RAR [ >>= 1 == <<= 8
0720 1031 0174 7400 AND (7400 [ KEEP 4 BITS
0721 1032 1103 0103 TAD XMWORD [ OR IN LOW 8 BITS
0722 1033 2073 0073 ISZ XMCNT
0723 1034 2073 0073 ISZ XMCNT
0724 1035 7000 NOP [ FOR SKIP
0725 1036 5600 1000 JMP;RDWD [ RETURN WITH WORD
0726 [
0727 [ ROUTINE TO READ 1
0730 [ 128 BYTE XMODEM BLOCK
0731 [
0732 1037 0000 #XMGET 0 [ RETURN ADDRESS
0733 1040 7300 CLA CLL
0734 1041 1177 1155 TAD (XMBUF [ XMPTR = ADDR(XMBUF)
0735 1042 3070 0070 DCA XMPTR
0736 1043 3072 0072 DCA XMCKSM [ XMCKSM = 0
0737 1044 1176 7600 TAD (0-128.
0740 1045 3073 0073 DCA XMCNT [ XMCNT = -128.
0741 1046 1074 0074 TAD XMACK [ SEND ACK OR NACK
0742 1047 4560 0466 JMS CHSEND
0743 1050 4546 0473 #XMGSOH JMS CHGET [ WAIT FOR SOH
0744 1051 3104 0104 DCA XMPROT [ SAVE CHAR
0745 1052 1104 0104 TAD XMPROT [ RESTORE
0746 1053 1145 7777 TAD (0-XSOH [ IS CHAR == SOH?
0747 1054 7450 SNA
0750 1055 5267 1067 JMP XMGBLK [ CHAR == SOH
0751 1056 7300 CLA CLL [ CHAR != SOH
0752 1057 1104 0104 TAD XMPROT [ IS CHAR == EOT?
0753 1060 1144 7774 TAD (0-XEOT
0754 1061 7450 SNA
0755 1062 5265 1065 JMP XMGEOT [ CHAR IS EOT
0756 1063 4350 1150 JMS XMNACK [ NOT EOT. JUNK! NAK!
8L OF XMTAPE PAGE 10
LN=0757
0757 1064 5250 1050 JMP XMGSOH [ AND GO LOOK FOR SOH
0760 1065 7301 #XMGEOT CLA CLL IAC [ IF EOT -- RETURN 1
0761 1066 5637 1037 JMP;XMGET
0762 1067 4546 0473 #XMGBLK JMS CHGET [ SOH. GET BLOCK #
0763 1070 7041 CMA IAC [ COMPARE TO EXPECTED
0764 1071 1071 0071 TAD XMBLK
0765 1072 7450 SNA
0766 1073 5277 1077 JMP XMGBLC [ OK. GET COMPLEMENT
0767 1074 7402 HLT [ NOT OK. HALT, THEN NAK
0770 1075 4350 1150 JMS XMNACK
0771 1076 5250 1050 JMP XMGSOH [ THEN GET SOH AGAIN
0772 1077 4546 0473 #XMGBLC JMS CHGET [ GET BLOCK COMPLEMENT
0773 1100 7001 IAC [ NOW IT IS -BLOCK (ALMOST)
0774 1101 1071 0071 TAD XMBLK [ COMPARE WITH EXPECTED
0775 1102 0143 0377 AND (377 [ 8 BIT SUM
0776 1103 7450 SNA
0777 1104 5310 1110 JMP XMGDAT [ OK - GO GET DATA
1000 1105 7402 HLT [ NOT OK. HALT, THEN NAK
1001 1106 4350 1150 JMS XMNACK
1002 1107 5250 1050 JMP XMGSOH
1003 1110 4546 0473 #XMGDAT JMS CHGET [ GET A CHAR OF DATA
1004 1111 3470 0070 DCA;XMPTR [ *XMPTR = CHAR
1005 1112 1470 0070 TAD;XMPTR [ RESTORE TO AC
1006 1113 1072 0072 TAD XMCKSM [ ADD TO CHKSUM
1007 1114 3072 0072 DCA XMCKSM
1010 1115 2070 0070 ISZ XMPTR [ ++XMPTR
1011 1116 7000 NOP [ FOR SKIP
1012 1117 2073 0073 ISZ XMCNT [ UNTIL ++XMCNT == 0
1013 1120 5310 1110 JMP XMGDAT
1014 1121 4546 0473 #XMGCKS JMS CHGET [ GET CHECKSUM CHAR
1015 1122 7041 CMA IAC [ - CHECKSUM
1016 1123 1072 0072 TAD XMCKSM [ COMPARE WITH EXPECTED
1017 1124 0143 0377 AND (377 [ 8 BIT SUM
1020 1125 7450 SNA
1021 1126 5334 1134 JMP XMGACK [ OK -- GO ACK
1022 1127 7402 HLT [ FOR DEBUGGING
1023 1130 7300 CLA CLL
1024 1131 1151 0025 TAD (XNAK [ PRIME TO NACK
1025 1132 3074 0074 DCA XMACK
1026 1133 5240 1040 JMP XMGET+1 [ AND TRY AGAIN
1027 1134 1147 0006 #XMGACK TAD (XACK [ ACK1
1030 1135 3074 0074 DCA XMACK [ PRIME TO ACK IT
1031 1136 7300 CLA CLL [ BUMP XMODEM BLOCK #
1032 1137 1071 0071 TAD XMBLK
1033 1140 7001 IAC
1034 1141 0143 0377 AND (377 [ ONLY 8 BITS!
1035 1142 3071 0071 DCA XMBLK
1036 1143 1177 1155 TAD (XMBUF [ XMPTR = ADDR(XMBUF)
1037 1144 3070 0070 DCA XMPTR
1040 1145 1176 7600 TAD (0-128. [ XMCNT = -128.
1041 1146 3073 0073 DCA XMCNT
1042 1147 5637 1037 JMP;XMGET [ RETURN (AC=0)
1043 [
1044 [ ROUTINE TO SEND
1045 [ A NACK CHAR
8L OF XMTAPE PAGE 11
LN=1046
1046 [
1047 1150 0000 #XMNACK 0 [ RETURN ADDR
1050 1151 7300 CLA CLL
1051 1152 1151 0025 TAD (XNAK
1052 1153 4560 0466 JMS CHSEND
1053 1154 5750 1150 JMP;XMNACK [ RETURN
1054 [
1055 [ XMODEM BUFFER
1056 [
1057 1155 0000 #XMBUF 0
8R OF XMTAPE PAGE 01
0001 AXO 0022 0137 0462 0625
0077 BLKCNT 0047 0077 0105 0214 0216 0217 0537 0541 0542 0645 0647 0650
0254 BLOCK 0141 0106 0143
0473 CHGET 0425 0321 0431 0743 0762 0772 1003 1014
0466 CHSEND 0414 0225 0353 0356 0362 0373 0407 0420 0546 0551 0654 0657
0742 1052
0523 CMPBLK 0464 0437 0466
0540 CMPCBK 0506 0532
0543 CMPCWD 0511 0523
0505 CMPHNK 0446 0544
0500 CMPINI 0436 0112
0511 CMPRB 0452 0474
6402 DKCC 0030 0404
6406 DKRB 0031 0430
6401 DKSF 0027 0426
6416 DTLS 0032 0415
6411 DTSF 0033 0416
0101 HNKCNT 0051 0125 0150 0161 0203 0450 0473 0504 0531 0567 0610 0613
0636
0102 HNKMEM 0052 0126 0130 0145 0147 0162 0167 0172 0201 0202 0451 0453
0470 0472 0505 0514 0520 0527 0530 0570 0576 0600 0606
0607 0614 0616 0633 0635
0274 HNKNXW 0166 0175
0271 HNKSND 0163 0204
0225 INIT1 0106 0100
0220 INITP 0101 0073
0002 PDP 0023 0133 0142 0456 0465 0621 0630
0242 RDBLK 0127 0151
0700 RDC 0025 0140 0463
0236 RDHNK 0123 0221
1012 RDWD1 0701 0676
1016 RDWD2 0705 0673
1000 RDWD 0667 0511 0574 0725
0075 ROTCNT 0045 0242 0245
0002 SRCMP 0015 0110
0001 SRTAPE 0014 0071
0004 SRWRIT 0016 0114
0200 START 0061 0227 0335 0553 0661
0023 TMA 0024 0132 0455 0620
0100 WDCNT 0050 0165 0174 0510 0522 0573 0602
0076 WDCNTI 0046 0075 0103 0164 0177 0507 0525 0572 0604
0706 WDE 0026 0626
0366 WDFILL 0302 0307
0361 WDFLSH 0275 0222 0301 0310
0335 WDROT 0244 0246
0330 WDSEND 0237 0171 0256 0267
0641 WTBLK 0615 0637
0653 WTBLOK 0627 0561 0631
0615 WTGBK 0571 0611
0611 WTGHNK 0565 0652
0620 WTGWD 0574 0603
0603 WTINI 0557 0116
0006 XACK 0012 0340 0545 0550 0653 0656 1027
0030 XCAN 0011 0332
0004 XEOT 0013 0224 0753
0074 XMACK 0044 0323 0324 0331 0337 0442 0564 0741 1025 1030
8R OF XMTAPE PAGE 02
0071 XMBLK 0041 0063 0265 0355 0360 0764 0774 1032 1035
1155 XMBUF 1057 0064 0261 0367 0701 0734 1036
0072 XMCKSM 0042 0364 0376 0377 0406 0736 1006 1007 1016
0073 XMCNT 0043 0067 0254 0255 0264 0276 0306 0366 0402 0440 0562 0671
0704 0722 0723 0740 1012 1041
1134 XMGACK 1027 1021
1077 XMGBLC 0772 0766
1067 XMGBLK 0762 0750
1121 XMGCKS 1014
1110 XMGDAT 1003 0777 1013
1065 XMGEOT 0760 0755
1037 XMGET 0732 0674 0761 1026 1042
1050 XMGSOH 0743 0757 0771 1002
1150 XMNACK 1047 0756 0770 1001 1053
0104 XMPROT 0054 0744 0745 0752
0070 XMPTR 0040 0065 0240 0243 0247 0251 0252 0262 0303 0304 0370 0372
0375 0400 0702 0706 0710 0712 0713 0735 1004 1005 1010
1037
0425 XMPUT 0350 0320 0410
0400 XMSEND 0317 0257 0327 0342 0343
0417 XMSND1 0336 0334
0446 XMSPUT 0371 0403
0103 XMWORD 0053 0707 0721
0025 XNAK 0010 0325 0441 0563 1024 1051
0001 XSOH 0007 0352 0746
=================================================
8L OF CMPTAP PAGE 01
LN=0001
0001 [
0002 [ PROGRAM TO COMARE TWO
0003 [ LINC TAPES IN STD OR
0004 [ 129. WORD FORMAT
0005 [
0006 [
0007 [ CONSTANTS
0010 [
0011 SRTAPE=1 [ SR 11 = 1 FOR DECTAPE
0012 [
0013 [ SPECIAL INSTRUCTIONS
0014 [
0015 AXO=1
0016 PDP=2
0017 TMA=23
0020 RDC=700
0021 [
0022 [ DATA
0023 [
0024 $70
0025 0070 0000 #WDCNTI 0 [ WORDS / BLOCK
0026 0071 0000 #BLKCNT 0 [ BLOCKS / TAPE
0027 0072 0000 #WDCNT 0 [ WORD COUNTER
0030 0073 0000 #HNKCNT 0 [ BLOCK COUNTER
0031 0074 0000 #HNKMEM 0 [ MEMORY POINTER
0032 [
0033 [ BEGIN HERE
0034 [
0035 $200
0036 0200 7402 #START HLT [ WAIT FOR TAPE MOUNT
0037 0201 7300 CLA CLL
0040 0202 7404 OSR [ READ RIGHT SWITCHES
0041 0203 0177 0001 AND (SRTAPE
0042 0204 7440 SZA [ SKIP IF STD LINC TAPE
0043 0205 5213 0213 JMP INITP [ GO INIT DEC TAPE
0044 0206 1176 7400 TAD (0-256. [ STD IS 256 WDS
0045 0207 3070 0070 DCA WDCNTI
0046 0210 1175 7000 TAD (0-1000 [ 1000 BLOCKS
0047 0211 3071 0071 DCA BLKCNT
0050 0212 5220 0220 JMP INIT1 [ CONTINUE
0051 0213 7300 #INITP CLA CLL
0052 0214 1174 7577 TAD (0-129. [ DEC TAPES 129. WDS
0053 0215 3070 0070 DCA WDCNTI
0054 0216 1173 5000 TAD (0-3000 [ 3000 BLOCKS
0055 0217 3071 0071 DCA BLKCNT
0056 0220 7300 #INIT1 CLA CLL
0057 0221 3241 0241 DCA BLOCK0 [ RESET BLOCK #'S
0060 0222 3270 0270 DCA BLOCK1
0061 [
0062 [ READ IN THE NEXT HUNK
0063 [ OF 16 BLOCKS
0064 [
0065 0223 7300 #RDHNK CLA CLL
0066 0224 1172 7760 TAD (0-16.
0067 0225 3073 0073 DCA HNKCNT [ HNKCNT = -16.
8L OF CMPTAP PAGE 02
LN=0070
0070 0226 3074 0074 DCA HNKMEM [ HNKMEM = 0
0071 0227 7300 #RDBLK0 CLA CLL [ READ HUNK FROM U0
0072 0230 1074 0074 TAD HNKMEM [ TMA MEM ADDR
0073 0231 6141 LINC
0074 0232 0023 TMA
0075 0233 0002 PDP
0076 0234 7300 CLA CLL
0077 0235 1171 1020 TAD (1020 [ XA FIELD 1
0100 0236 6141 LINC
0101 0237 0001 AXO
0102 0240 0700 RDC 0 [ READ UNIT 0
0103 0241 0000 #BLOCK0 0 [ BLOCK NUMBER
0104 0242 0002 PDP
0105 0243 2241 0241 ISZ BLOCK0 [ ++BLOCK0
0106 0244 7300 CLA CLL
0107 0245 1074 0074 TAD HNKMEM [ HNKMEM += 256.
0110 0246 1170 0400 TAD (256.
0111 0247 3074 0074 DCA HNKMEM
0112 0250 2073 0073 ISZ HNKCNT [ UNTIL ++HNKCNT == 0
0113 0251 5227 0227 JMP RDBLK0
0114 [
0115 [ THEN READ A HUNK
0116 [ FROM UNIT 1
0117 [
0120 0252 7300 CLA CLL
0121 0253 1172 7760 TAD (0-16. [ HNKCNT = -16.
0122 0254 3073 0073 DCA HNKCNT
0123 0255 3074 0074 DCA HNKMEM [ HNKMEM = 0
0124 0256 7300 #RDBLK1 CLA CLL
0125 0257 1074 0074 TAD HNKMEM [ TMA MEM ADDR
0126 0260 6141 LINC
0127 0261 0023 TMA
0130 0262 0002 PDP
0131 0263 7300 CLA CLL
0132 0264 1167 2020 TAD (2020 [ XA MODE, FIELD 2
0133 0265 6141 LINC
0134 0266 0001 AXO
0135 0267 0710 RDC 10 [ READ UNIT 1
0136 0270 0000 #BLOCK1 0
0137 0271 0002 PDP
0140 0272 2270 0270 ISZ BLOCK1 [ ++BLOCK1
0141 0273 7300 CLA CLL
0142 0274 1074 0074 TAD HNKMEM [ HNKMEM += 256
0143 0275 1170 0400 TAD (256.
0144 0276 3074 0074 DCA HNKMEM
0145 0277 2073 0073 ISZ HNKCNT [ UNTIL ++HNKCNT == 0
0146 0300 5256 0256 JMP RDBLK1
0147 [
0150 [ THEN COMPARE THE
0151 [ TWO, 1 WORD AT A
0152 [ TIME, BLOCK BY BLOCK
0153 [ UNTIL THE HUNK IS DONE
0154 [
0155 0301 7300 CLA CLL
0156 0302 1172 7760 TAD (0-16. [ BLOCKS / HUNK
8L OF CMPTAP PAGE 03
LN=0157
0157 0303 3073 0073 DCA HNKCNT
0160 0304 3074 0074 DCA HNKMEM [ HNKMEM = 0
0161 0305 7300 #CMPBLK CLA CLL
0162 0306 1070 0070 TAD WDCNTI [ WDCNT = -WORDS/BLOCK
0163 0307 3072 0072 DCA WDCNT
0164 0310 7300 #CMPWD CLA CLL
0165 0311 6211 CDF 10 [ DATA FIELD 1
0166 0312 1474 0074 TAD;HNKMEM [ GET WORD
0167 0313 7041 CMA IAC [ -WORD
0170 0314 6221 CDF 20 [ DATA FIELD 2
0171 0315 1474 0074 TAD;HNKMEM
0172 0316 6201 CDF 0 [ BACK TO NORMAL
0173 0317 7440 SZA [ DID WORDS COMPARE?
0174 0320 7402 HLT [ MIS COMPARE !!
0175 0321 2074 0074 ISZ HNKMEM [ ++HNKMEM
0176 0322 7000 NOP [ FOR SKIP
0177 0323 2072 0072 ISZ WDCNT [ UNTIL BLOCK IS DONE
0200 0324 5310 0310 JMP CMPWD
0201 0325 7300 CLA CLL
0202 0326 1070 0070 TAD WDCNTI [ BUMP TO NEXT BLOCK
0203 0327 1170 0400 TAD (256.
0204 0330 1074 0074 TAD HNKMEM
0205 0331 3074 0074 DCA HNKMEM
0206 0332 2073 0073 ISZ HNKCNT [ UNTIL ALL HUNKS DONE
0207 0333 5305 0305 JMP CMPBLK
0210 [
0211 [ SEE IF ALL HUNKS
0212 [ HAVE BEEN COMPARED
0213 [
0214 0334 7300 CLA CLL
0215 0335 1071 0071 TAD BLKCNT [ BLKCNT += 16
0216 0336 1166 0020 TAD (16.
0217 0337 3071 0071 DCA BLKCNT
0220 0340 1071 0071 TAD BLKCNT [ RESTORE BLOCK COUNTER
0221 0341 7440 SZA [ ALL DONE?
0222 0342 5223 0223 JMP RDHNK [ NOPE - BACK FOR MORE
0223 0343 7402 HLT [ ALL DONE1
0224 0344 5201 0201 JMP START+1 [ TO RUN AGAIN
8R OF CMPTAP PAGE 01
0001 AXO 0015 0101 0134
0071 BLKCNT 0026 0047 0055 0215 0217 0220
0241 BLOCK0 0103 0057 0105
0270 BLOCK1 0136 0060 0140
0305 CMPBLK 0161 0207
0310 CMPWD 0164 0200
0073 HNKCNT 0030 0067 0112 0122 0145 0157 0206
0074 HNKMEM 0031 0070 0072 0107 0111 0123 0125 0142 0144 0160 0166 0171
0175 0204 0205
0220 INIT1 0056 0050
0213 INITP 0051 0043
0002 PDP 0016 0075 0104 0130 0137
0227 RDBLK0 0071 0113
0256 RDBLK1 0124 0146
0700 RDC 0020 0102 0135
0223 RDHNK 0065 0222
0001 SRTAPE 0011 0041
0200 START 0036 0224
0023 TMA 0017 0074 0127
0072 WDCNT 0027 0163 0177
0070 WDCNTI 0025 0045 0053 0162 0202
More information about the cctech
mailing list