blob: b77fc6525d6be88fdffa5683772d4978784e5df7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
; This test tries to figure out a couple of unknown opcodes.
incdir "tests"
include "dsp_base.inc"
// 0x02ca is an unknown opcode found in Zelda ucodes.
// 0x02ca logically shifts (not rotates) the whole ACC0 right by signed 16-bit value AC1.M
// (So, if AC1.M is negative, it shifts left).
// We'll call it lsrn, no arguments.
// 0x02cb is the same opcode, but arithmetic.
// We'll call it asrn, no arguments.
test_main:
clr $ACC0
clr $ACC1
lri $AC0.H, #0
lri $AC0.M, #256
//neg $ACC0
lri $AC0.L, #1
lri $AC1.H, #0xFF
lri $AC1.M, #1
lri $AC1.L, #0xFF
call send_back
cw 0x02ca
call send_back
cw 0x02ca
call send_back
cw 0x02ca
call send_back
cw 0x02ca
call send_back
jmp end_of_test
|