
; > ClrMem : Clears memory between 100 and 177776 (octal)
;
START:  EQU     O100
END:    EQU     O177776
        ORG     O10
        MOV     #OOPS,@#4       ; set trap at 4, PSW at 6
        CLR     @#6
        MOV     #START,R0       ; set R0 to point to first location
L1:     CLR     (R0)+           ; clear indicated loc'n and point to next
        CMP     #END+2,R0       ; is next past end ?
        BNE     L1              ; if not, go and repeat
        HALT
OOPS:   DEC     R0              ; get here if bus times out
        DEC     R0              ; point to last location
        JMP     (R0)            ; which has a HALT instruction (zero)
