;
;   Register stack tests.  Pushes and pops registers using register
;   masks and the PUSHR / POPR instructions.
;

        .base       200

main:   movl        #1, r1
        movl        #2, r2
        movl        #3, r3
        movl        #4, r4

        pushr       #^m<r1,r3>

        movl        #33, r3
        
        popr        #^m<r1,r3>
        
        addl3       r1,r2,r5
        addl2       r3,r5
        
        cmpl        #6,r5
        bneq        error
        halt

error:  bpt
