2009-05-02 22:47:13 +00:00
|
|
|
; various arithmetic tests
|
|
|
|
incdir "tests"
|
|
|
|
include "dsp_base.inc"
|
|
|
|
|
|
|
|
clr $acc0
|
|
|
|
tst $acc0
|
|
|
|
|
|
|
|
call send_back ; 1
|
|
|
|
|
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
lri $ac0.h, #0x0011
|
2009-05-02 22:47:13 +00:00
|
|
|
lri $ac0.m, #0x0100
|
2009-06-29 17:13:21 +00:00
|
|
|
lri $ac0.l, #0x0101
|
2009-05-02 22:47:13 +00:00
|
|
|
lsl $acc0, #1
|
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
call send_back ; 2
|
2009-05-02 22:47:13 +00:00
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
lri $ac0.h, #0x0011
|
2009-05-02 22:47:13 +00:00
|
|
|
lri $ac0.m, #0x0100
|
|
|
|
lri $ac0.l, #0x0001
|
|
|
|
asl $acc0, #1
|
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
call send_back ; 3
|
2009-05-02 22:47:13 +00:00
|
|
|
|
|
|
|
clr $acc0
|
2009-06-29 17:13:21 +00:00
|
|
|
lri $ac0.h, #0x0011
|
2009-05-02 22:47:13 +00:00
|
|
|
tst $acc0
|
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
call send_back ; 4
|
2009-05-02 22:47:13 +00:00
|
|
|
|
|
|
|
lri $ac0.m, #0x0100
|
|
|
|
tst $acc0
|
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
call send_back ; 5
|
2009-05-02 22:47:13 +00:00
|
|
|
|
|
|
|
lri $ac0.l, #0x0001
|
|
|
|
tst $acc0
|
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
call send_back ; 6
|
2009-05-02 22:47:13 +00:00
|
|
|
clr $acc0
|
|
|
|
|
|
|
|
lri $ac0.l, #-1
|
|
|
|
tst $acc0
|
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
call send_back ; 7
|
2009-05-02 22:47:13 +00:00
|
|
|
|
|
|
|
clr $acc0
|
|
|
|
|
2009-06-29 20:31:41 +00:00
|
|
|
set40
|
2009-05-02 22:47:13 +00:00
|
|
|
lri $ac0.l, #-1
|
|
|
|
tst $acc0
|
2009-06-29 20:31:41 +00:00
|
|
|
set16
|
2009-05-02 22:47:13 +00:00
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
call send_back ; 8
|
2009-05-02 22:47:13 +00:00
|
|
|
|
|
|
|
clr $acc0
|
|
|
|
lri $ac0.h, #0x1000
|
|
|
|
tst $acc0
|
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
call send_back ; 9
|
2009-05-02 22:47:13 +00:00
|
|
|
|
|
|
|
clr $acc0
|
|
|
|
lri $ac0.h, #0x0100
|
|
|
|
tst $acc0
|
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
call send_back ; 10
|
2009-05-02 22:47:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
clr $acc0
|
|
|
|
lri $ac0.h, #0x0010
|
|
|
|
tst $acc0
|
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
call send_back ; 11
|
2009-05-02 22:47:13 +00:00
|
|
|
|
|
|
|
clr $acc0
|
|
|
|
lri $ac0.h, #0x0001
|
|
|
|
tst $acc0
|
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
call send_back ; 12
|
2009-05-02 22:47:13 +00:00
|
|
|
|
|
|
|
clr $acc0
|
|
|
|
lri $ac0.l, #0x1000
|
|
|
|
tst $acc0
|
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
call send_back ; 13
|
2009-05-02 22:47:13 +00:00
|
|
|
|
|
|
|
clr $acc0
|
|
|
|
lri $ac0.l, #0x0100
|
|
|
|
tst $acc0
|
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
call send_back ; 14
|
2009-05-02 22:47:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
clr $acc0
|
|
|
|
lri $ac0.l, #0x0010
|
|
|
|
tst $acc0
|
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
call send_back ; 15
|
2009-05-02 22:47:13 +00:00
|
|
|
|
|
|
|
clr $acc0
|
|
|
|
lri $ac0.l, #0x0001
|
|
|
|
tst $acc0
|
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
call send_back ; 16
|
2009-05-02 22:47:13 +00:00
|
|
|
|
|
|
|
clr $acc0
|
|
|
|
clr $acc1
|
|
|
|
lri $ac0.l, #0x0001
|
|
|
|
sub $acc1, $acc0
|
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
call send_back ; 17
|
2009-05-02 22:47:13 +00:00
|
|
|
|
|
|
|
clr $acc0
|
|
|
|
clr $acc1
|
2009-06-29 20:31:41 +00:00
|
|
|
set40
|
2009-05-02 22:47:13 +00:00
|
|
|
lri $ac0.l, #0x0001
|
|
|
|
sub $acc1, $acc0
|
2009-06-29 20:31:41 +00:00
|
|
|
set16
|
2009-05-02 22:47:13 +00:00
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
call send_back ; 18
|
2009-05-02 22:47:13 +00:00
|
|
|
|
|
|
|
clr $acc0
|
|
|
|
clr $acc1
|
|
|
|
lri $ac0.l, #0x0001
|
|
|
|
lri $ac1.h, #0x8000
|
|
|
|
sub $acc1, $acc0
|
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
call send_back ; 19
|
2009-05-02 22:47:13 +00:00
|
|
|
|
|
|
|
clr $acc0
|
|
|
|
clr $acc1
|
2009-06-29 20:31:41 +00:00
|
|
|
set40
|
2009-05-02 22:47:13 +00:00
|
|
|
lri $ac0.l, #0x0001
|
|
|
|
lri $ac1.h, #0x8000
|
|
|
|
sub $acc1, $acc0
|
2009-06-29 20:31:41 +00:00
|
|
|
set16
|
2009-05-02 22:47:13 +00:00
|
|
|
|
2009-06-29 17:13:21 +00:00
|
|
|
call send_back ; 20
|