;
; group p, test 1
;
; bset.8 a,mask,d8
; bclr.8 b.mask,d8
;

m4_include(..\tmacros.h)

INIT_TEST(p,0x01)

; declare symbols here
SYM(failhop0)
SYM(failhop1)
SYM(failhop2)
SYM(failhop3)
SYM(next0)
SYM(next1)
SYM(next2)
SYM(next3)
SYM(next4)
SYM(next5)
SYM(next6)
SYM(next7)
SYM(next8)

   
;
    SUBTEST(1)
    ld.8    a,0x5
    bset.8  a,0xa,failhop0
    br	next0
failhop0:
    FAIL
next0:

    SUBTEST(2)
    ld.8    a,0xa
    bset.8  a,0x5,failhop1
    br	next1
failhop1:
    FAIL
next1:

    SUBTEST(3)
    ld.8    a,0x5
    bset.8  a,0x4,next2
    FAIL
next2:

    SUBTEST(4)
    ld.8    a,0xa
    bset.8  a,0xa,next3
    FAIL
next3:

    SUBTEST(5)
    ld.8    a,0x8
    bclr.8  a,0xa,failhop2
    br	next4
failhop2:
    FAIL
next4:

    SUBTEST(6)
    ld.8    a,0xa
    bclr.8  a,0x2,failhop3
    br	next5
failhop3:
    FAIL
next5:

    SUBTEST(7)
    ld.8    a,0x1
    bclr.8  a,0x4,next6
    FAIL
next6:

    SUBTEST(8)
    ld.8    a,0x5
    bclr.8  a,0xa,next7
    FAIL
next7:


;   Finally, when done branch to pass
    END_TEST
