.title M9312 'DS' BOOT prom for RS03/RS04 controller ; This source code is an exact copy of the DEC M9312 23-759A9 boot PROM. ; ; This boot PROM is for the RS11 controller with RS03/RS04 drives. ; ; Multiple units and/or CSR addresses are supported via different entry points. ; ; Standard devices are 82S131, Am27S13, 74S571 or other compatible bipolar ; PROMs with a 512x4 TriState 16pin DIP architecture. This code resides in ; the low half of the device; the top half is blank and unused. ; ; Alternatively, 82S129 compatible 256x4 TriState 16pin DIP devices can be ; used, as the uppermost address line (hardwired low) is an active low chip ; select (and will be correctly asserted low). rscsr =172040 ; std RS11 csrbase rscs1 =+0 ; control/status1 rswc =+2 ; word count rscs2 =+10 ; control/status2 rsas =+16 ; attention summary diags =165564 ; console diags phase2 entry .asect .=173000 ; -------------------------------------------------- start: .ascii "SD" ; device code (reversed) .word last-. ; offset to next boot header ds0n: sec ; boot std csr, unit zero, no diags ds0d: mov #0,r0 ; boot std csr, unit zero, with diags dsNr: mov #rscsr,r1 ; boot std csr, unit dsNb: mov pc,r4 ; boot csr , unit bcc diag ; br if diags requested br go ; return to (R4)+2 from diags ; then skip over pseudo reboot vector ; -------------------------------------------------- .word 173000 ; prom start addess @ 24 .word 340 ; and priority level @ 26 ; -------------------------------------------------- go: mov r0,r3 ; copy unit number mov r3,rscs2(r1) ; set unit number mov rsas(r1),rsas(r1) ; clear attention mov #-512.,rswc(r1) ; set word count mov #71,(r1) ; command read+go 2$: tstb (r1) ; wait for done bpl 2$ ; loop tst (r1) ; check error bmi 3$ ; br if error clr pc ; jump to bootstrap at zero 3$: reset ; reset controller jmp 2(r4) ; and retry boot ; -------------------------------------------------- diag: jmp @#diags ; jump to console diags ; -------------------------------------------------- .word 0,0,0,0,0,0,0,0 ; unused .word 0,0,0,0,0,0,0,0 ; .word 0,0,0,0,0,0,0,0 ; .word 0,0,0,0,0,0 ; ; -------------------------------------------------- .=start+176 crc16: .word <126075> ; CRC-16 will go here last: ; next boot prom starts here .end