;
; group c, test 1
;
; register to register copy
;

m4_include(..\tmacros.h)

INIT_TEST(c,0x01)

; declare labels here
SYM(next0)
SYM(next1)
SYM(next2)
SYM(next3)

; Begin test here

SUBTEST(1)

; Now, put actual test code here....

   ; Fairly simple tests - but need to be careful with MSW
   ; copies, as we don't want to test MSW functions yet.
   ; Also, can't really test copying a to ptb yet.  We'll
   ; get that test functionality in the paging tests.
   ;
   ; So, won't test "copy msw,a", "copy a,msw", "copy ptb,a" here.
   ;
   ; Remaining copies to test are:
   ;	b,a
   ;	c,a
   ;	dp,a
   ;	sp,a
   ;	a,b
   ;	a,c
   ;	a,dp
   ;	a,sp

    ld.16   a,0xbbbb
    copy    b,a
    ld.16   a,0xcccc
    copy    c,a
    ld.16   a,0xdddd
    copy    dp,a
    ld.16   a,0xeeee
    copy    sp,a

    copy    a,b
    cmpb.eq.16	a,0xbbbb,next0
    FAIL

next0:
    copy    a,c
    cmpb.eq.16	a,0xcccc,next1
    FAIL

next1:
    copy    a,dp
    cmpb.eq.16	a,0xdddd,next2
    FAIL

next2:
    copy    a,sp
    cmpb.eq.16	a,0xeeee,next3
    FAIL

    ; Restore SP
next3:
    ld.16   a,0x7000
    copy    sp,a


;   Finally, when done branch to pass
    END_TEST

