; M792-YA paper tape bootstrap; loads files in PDP-11 Bootstrap Loader ; format over either high-speed paper tape reader, or console serial ; line (which would have been a Teletype with low-speed paper tape reader ; when this was produced). ; ; Sequence of tasks: ; 1 - See which reader ; 2 - Size memory ; 3 - Leave dev addr in last word ; 4 - Load program (usually abs loader) in boot format ; 5 - Jump to it ; ; Checking devs is at 024, which will fail and trap, looping at ; 016, until R1 points to good register. ; Sizing memory is at 036, which will fail and trap, looping at ; 032, until R1 points to good memory. 173000 12701 MOV #160000, R1 ; Set up for mem check 173002 160000 173004 12702 MOV #4, R2 ; NXM vector 173006 4 173010 12703 MOV #DEVS, R3 ; Pointer to device addrs 173012 173100 173014 10712 MOV PC, @R2 ; Set NXM vector to ignore 173016 12706 MOV #24, SP ; Special stack 173020 24 173022 14304 DCHK: MOV -(R3), R4 ; Pick up dev addr 173024 5714 TST @R4 ; Is it there? 173026 100775 BMI DCHK ; An error? 173030 10712 MOV PC, @R2 ; Reset NXM vector 173032 12706 MOV #24, SP ; Reset special stack 173034 24 173036 10441 MOV R4, -(R1) ; Check mem 173040 40601 BIC SP, R1 ; Turn into buffer pointer address 173042 10111 MOV R1, @R1 ; Save addr in pointer 173044 11102 LP: MOV @R1, R2 ; Pick up pointer 173046 5214 INC @R4 ; Turn on reader 173050 105714 TSTB @R4 ; Read char? 173052 100376 BPL .-2 ; Not yet 173054 116412 MOVB 2(R4), @R2 ; Save char 173056 2 173060 5211 INC @R1 ; Bump pointer 173062 120227 CMPB R2,#375 ; Was it jump offset? 173064 375 173066 1366 BNE LP ; No, get next 173070 105222 INCB (R2)+ ; Convert to jump addr 173072 142 JMP -(R2) ; and go 173074 177560 ; Console 173076 177550 ; HSR DEVS: ; Variant version found on some later cards. ; This version makes sure the new PS loaded on a NXM fault is 0, ; and not whatever trash happened to be in memory location 6. 173000 12701 MOV #160000, R1 ; Set up for mem check 173002 160000 173004 12702 MOV #6, R2 ; New PS of NXM vector 173006 6 173010 12703 MOV #DEVS, R3 ; Pointer to device addrs 173012 173100 173014 5012 CLR @R2 ; Clear new PS 173016 10742 MOV PC, -(R2) ; New PC is next 173020 110706 MOVB PC, SP ; Special stack at 22