
       .TITLE .KM15BT
/PDP-15 ADVANCED MONITOR DRUM BOOTSTRAP
/WRITTEN SPECIALLY FOR THE NRB PDP-15 SYSTEM.
/KENRICK CHIN, 28TH. MAY, 1975.
/
/IF ENTERED VIA .DTBEG OR .DTOUT, 4 CELLS MUST BE SET--
/.DTBLK = STARTING BLOCK# OF AREA TO BE LOADED
/.DTCA  = CA-1 OF CORE AREA TO BE LOADED
/.DTWC  = -WC (2'S COMPLEMENT) OF CORE AREA TO BE LOADED
/.SCOM+5= START ADDRESS WHEN LOAD COMPLETE
/
/256 WORDS PER BLOCK
/8 BLOCKS PER TRACK
.SCOM=100
DRSF=707001
DRCF=707002
DRDA=707004
DRCL=707201
DRRS=707212
       .FULL
       .LOC 17637
/
/NON-RESIDENT CELLS
/
.DTBLK 0             /REQUESTED BLOCK#
.DTCA  0             /CORE ADDR - 1
.DTWC  0             /2'S COMP WC
       0
       0
       0
       0
/
/RESIDENT DRUM BOOTSTRAP
/FOR KM-15 LOAD, START AT .BOOT
/
.BOOT  LAC .L077       /START TRANS AT LOC 100
       DAC .DTCA
       LAC .LITWC      /WC = -17000
       DAC .DTWC
       DZM .DTBLK      /START AT BLOCK 0
       JMP .DTBEG
.L077  77
.L105  105
.LITWC 761000
.DMSK  777776
.DTRW  0
.DEXIT 0
.DMSK1 1777
/
/FOR NON-KM-15 LOAD, START AT .DTBEG
/
.DTBEG CLA             /READ
       SKP
.DTOUT CLA!IAC         /WRITE
       DAC .DTRW       /SET READ-WRITE
.DRST  CAF             /BOOTSTRAP RESTART
       DRCL            /CLEAR DRUM
       LAC .DTWC
       AND .DMSK       /USE NEXT EVEN NUMBER
       DAC 17764       /SET WC LOCATION
       LAC .DTCA
       DAC 17765       /SET CA LOCATION
       LAC .DTBLK      /SET TRACK, SECTOR ADDR
       AND .DMSK1      /BLOCKS 0 TO 1777 ONLY
                       /8 BLOCKS PER TRACK
       CLL!RTL
       RTL
       RTL
 JMP CONT          /SKIP OVER STOP INSTR.
.DSTOP HLT
 JMP .DRST
CONT RTL
       TAD .DTRW       /READ-WRITE
       DRDA            /DRUM ACCESS
       DRSF
       JMP .-1
       DRCF
       DRRS            /READ DRUM STATUS
       SZA
 JMP .DSTOP           /DRUM ERROR
       LAC* .L105      /DONE, EXIT
       DAC  .DEXIT
       CAF
       JMP* .DEXIT     /EXIT
       .END .BOOT
