;
; group d, test 3
;
; ldclr
;

m4_include(..\tmacros.h)

INIT_TEST(d,0x03)

SYM(next0)
SYM(next1)
SYM(next2)
SYM(next3)
SYM(data)

; Begin test here


;   Define some data, and branch around it.

    br	next0

data:
    defb    0x23

next0:

SUBTEST(1)

    ld.16   b,data
    ld.8    a,0(b)
    cmpb.eq.8	a,0x23,next1
    FAIL

next1:

SUBTEST(2)

    ld.16   b,0x6000
    ld.8    a,0x23
    st.8    0(b),a
    ld.8    a,0x00
    ldclr.8   a,(b)
    cmpb.eq.8	a,0x23,next2
    FAIL
next2:
    ld.8    a,0(b)
    cmpb.eq.8	a,0x00,next3
    FAIL

next3:


;   Finally, when done branch to pass
    END_TEST
