
 .ABS
 .LOC 100
 .TITLE  MTDRC    /MAG TO DRUM COPY
/
/ IOT'S
/
MTSF=707301
MTSE=707341
MTLC=707304
MTGO=707344
MTCL=707302
MTRS=707352
/
DRDA=707004
DRRS=707212
DRSF=707001
DRCL=707201
/
TLS=700406
TSF=700401
/
START DZM BLKN
 LAW -777
 DAC TST   /# BLKS
 DZM DRAD  /DRUM ADDR.
/
LOOP LAC (BUFF-1
 DAC 17763    /CA-1 FOR MT
 DAC 17765    / AND DR
 LAW -400     / -WC
 DAC 17762
 DAC 17764
/
 LAC COM   /MT COMMAND
 MTCL
 MTLC
 MTGO
 MTSF
 SKP
 JMP OUT
 MTSE
 JMP .-4
/
OUT MTRS     /MT BLOCK READ IN
 AND (400000  /CHECK FOR ERR
 SZA
 JMP ERRM     /ERR. ON MT
DRMX LAC DRAD /DR ADDR.
 IAC     /FOR WRITE
 DRCL
 DRDA
 DRSF
 JMP .-1   /DR BLK WRITTEN
/
 LAC (BUF1-1
 DAC 17765   /CHECK BLK
 LAW -400
 DAC 17764
 LAC DRAD
 DRCL
 DRDA
 DRSF
 JMP .-1
 DRRS
 SZA    /CHECK FOR ERR.
 JMP ERRD   /DRUM ERR.
/
CONT ISZ BLKN    /NEXT BLK
 LAC DRAD
 ADD (400
 DAC DRAD    /NEXT BLK ADDR.
 ISZ TST
 JMP LOOP
/
 LAC REW  /FINISHED
 MTLC     /REW MT.
 HLT
/
ERRM LAC BLKN   /MT ERR.
 JMS PRNTN     /PRINT BLK #
 JMS SPC3
 MTRS
 JMS PRNTN      /PRINT STATS
 LAC (315
 JMS PRNT       / 'M' FOR MT
 JMS CRLF
 JMP DRMX  /
/
ERRD LAC BLKN   /DR ERR
 JMS PRNTN
 JMS SPC3
 DRRS
 JMS PRNTN
 LAC (304
 JMS PRNT
 JMS CRLF
 JMP CONT
/
PRNTN 0    /PRINT 6 DIGIT OCTAL INT.
 DAC TEMP
 LAW -6
 DAC CNT   /6 DIGIT COUNT
RLOOP LAC TEMP
 RTL
 RAL
 DAC TEMP
 RAL
 AND (7
 XOR (260
 JMS PRNT
 ISZ CNT
 JMP RLOOP
 JMP* PRNTN
/
SPC3 0   /PRNT 3 SPACES
 LAC (240
 JMS PRNT
 JMS PRNT
 JMS PRNT
 JMP* SPC3
/
PRNT 0   /PRINT A CHAR
 TLS
 TSF
 JMP .-1
 JMP*  PRNT
/
CRLF 0  /PRNT CR & LF
 LAC (15
 JMS PRNT
 LAC (12
 JMS PRNT
 JMP* CRLF
/
REW 4000
COM 100
TEMP 0
TST 0
CNT 0
BLKN 0
DRAD 0
/
BUFF .BLOCK 400
BUF1 .BLOCK 400
 .END START
?