; bootstrap loader from Prog Ref pVI-7 .loc 7740 ; for 4K system beg: iorst ;reset all i/o reads 0 ;read switches into ac0 lda 1,c77 ;get device mask (000077) and 0,1 ;isolate device code com 1,1 ;- device code - 1 loop: isz op1 ;count device code into all isz op2 ;i/o instructions isz op3 inc 1,1,szr ;done? jmp loop ;no, increment again lda 2,c377 ;yes, put jmp 377 into location 377 sta 2,377 op1: 060077 ;start device: (nios 0) - 1 movl 0,0,szc ;low speed device? (test switch 0) c377: jmp 377 ;no, go to 377 and wait for channel loop2: jsr get+1 ;get a frame movc 0,0,snr ;is it non-zero? jmp loop2 ;no, ignore and get another loop4: jsr get ;yes, get full word sta 1,@c77 ;store starting at 100 2's complement of word count ;(autoincrement) isz 100 ;count word - done? jmp loop4 ;no, get another c77: jmp 77 ;yes-location counter and jump to last word get: subz 1,1 ;clear ac1, set carry op2: loop3: 063577 ;done? (skpdn 0) - 1 jmp loop3 ;no, wait op3: 060477 ;yes, read in ac0: (dias 0,0) - 1 addcs 0,1,snc ;add 2 frames swapped - got second? jmp loop3 ;no, go back after it movs 1,1 ;yes, swap them jmp 0,3 ;return with full word 0 ;padding .end