mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
c34a738b4c
Without this, execution continues beyond the end of the function, into the great unknown (probably eventually falling into either code left from a previous test, or the start of the DSP ROM). end_of_test is just an infinite loop to stop executing until the DSP is reset.
144 lines
1.5 KiB
Plaintext
144 lines
1.5 KiB
Plaintext
; various arithmetic tests
|
|
incdir "tests"
|
|
include "dsp_base.inc"
|
|
|
|
test_main:
|
|
|
|
clr $acc0
|
|
tst $acc0
|
|
|
|
call send_back ; 1
|
|
|
|
|
|
lri $ac0.h, #0x0011
|
|
lri $ac0.m, #0x0100
|
|
lri $ac0.l, #0x0101
|
|
lsl $acc0, #1
|
|
|
|
call send_back ; 2
|
|
|
|
lri $ac0.h, #0x0011
|
|
lri $ac0.m, #0x0100
|
|
lri $ac0.l, #0x0001
|
|
asl $acc0, #1
|
|
|
|
call send_back ; 3
|
|
|
|
clr $acc0
|
|
lri $ac0.h, #0x0011
|
|
tst $acc0
|
|
|
|
call send_back ; 4
|
|
|
|
lri $ac0.m, #0x0100
|
|
tst $acc0
|
|
|
|
call send_back ; 5
|
|
|
|
lri $ac0.l, #0x0001
|
|
tst $acc0
|
|
|
|
call send_back ; 6
|
|
clr $acc0
|
|
|
|
lri $ac0.l, #-1
|
|
tst $acc0
|
|
|
|
call send_back ; 7
|
|
|
|
clr $acc0
|
|
|
|
set40
|
|
lri $ac0.l, #-1
|
|
tst $acc0
|
|
set16
|
|
|
|
call send_back ; 8
|
|
|
|
clr $acc0
|
|
lri $ac0.h, #0x1000
|
|
tst $acc0
|
|
|
|
call send_back ; 9
|
|
|
|
clr $acc0
|
|
lri $ac0.h, #0x0100
|
|
tst $acc0
|
|
|
|
call send_back ; 10
|
|
|
|
|
|
clr $acc0
|
|
lri $ac0.h, #0x0010
|
|
tst $acc0
|
|
|
|
call send_back ; 11
|
|
|
|
clr $acc0
|
|
lri $ac0.h, #0x0001
|
|
tst $acc0
|
|
|
|
call send_back ; 12
|
|
|
|
clr $acc0
|
|
lri $ac0.l, #0x1000
|
|
tst $acc0
|
|
|
|
call send_back ; 13
|
|
|
|
clr $acc0
|
|
lri $ac0.l, #0x0100
|
|
tst $acc0
|
|
|
|
call send_back ; 14
|
|
|
|
|
|
clr $acc0
|
|
lri $ac0.l, #0x0010
|
|
tst $acc0
|
|
|
|
call send_back ; 15
|
|
|
|
clr $acc0
|
|
lri $ac0.l, #0x0001
|
|
tst $acc0
|
|
|
|
call send_back ; 16
|
|
|
|
clr $acc0
|
|
clr $acc1
|
|
lri $ac0.l, #0x0001
|
|
sub $acc1, $acc0
|
|
|
|
call send_back ; 17
|
|
|
|
clr $acc0
|
|
clr $acc1
|
|
set40
|
|
lri $ac0.l, #0x0001
|
|
sub $acc1, $acc0
|
|
set16
|
|
|
|
call send_back ; 18
|
|
|
|
clr $acc0
|
|
clr $acc1
|
|
lri $ac0.l, #0x0001
|
|
lri $ac1.h, #0x8000
|
|
sub $acc1, $acc0
|
|
|
|
call send_back ; 19
|
|
|
|
clr $acc0
|
|
clr $acc1
|
|
set40
|
|
lri $ac0.l, #0x0001
|
|
lri $ac1.h, #0x8000
|
|
sub $acc1, $acc0
|
|
set16
|
|
|
|
call send_back ; 20
|
|
|
|
; We're done, DO NOT DELETE THIS LINE
|
|
jmp end_of_test
|