clear_regs: pshx pshy psha pshb // save all values in the IRs and accumulators ldx #reg_file // load into x the address of reg_file ldy #0 ldaa #8 // number of regs in lc3/2 clear_regs_loop: cmpa #0 beq clr_regs_loop_end sty 0,x inx inx deca jmp clear_regs_loop clr_regs_loop_end: pulb pula puly pulx rts