some tests
[megadrive.git] / testsram / sega_gcc.s
CommitLineData
3ee911dc 1exc_tab:\r
2 dc.l 0, 0x200, exc02, exc03, exc04, exc05, exc06, exc07\r
3 dc.l exc08, exc09, exc0a, exc0b, exc0c, exc0d, exc0e, exc0f\r
4 dc.l exc10, exc11, exc12, exc13, exc14, exc15, exc16, exc17\r
5 dc.l exc18, exc19, exc1a, exc1b, HBL, exc1d, VBL, exc1f\r
6 dc.l exc20, exc21, exc22, exc23, exc24, exc25, exc26, exc27\r
7 dc.l exc28, exc29, exc2a, exc2b, exc2c, exc2d, exc2e, exc2f\r
8 dc.l exc30, exc31, exc32, exc33, exc34, exc35, exc3e, exc37\r
9 dc.l exc38, exc39, exc3a, exc3b, exc3c, exc3d, exc3e, exc3f\r
10\r
11 .ascii "SEGA GENESIS "\r
12 .ascii "SRAM test "\r
13 .ascii "SRAM test "\r
14 .ascii "GM 00000000-00"\r
15 .byte 0x00,0x00\r
16 .ascii "J "\r
17 .byte 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00\r
18 .byte 0x00,0xff,0x00,0x00,0xff,0xff,0xff,0xff\r
19 .ascii "RA"; .byte 0xf8,0x20 /* 1b0 */\r
20 .byte 0x00,0x02,0x00,0x00,0x00,0x3f,0xff,0xff /* 1b4 */\r
21 .ascii " " /* 1bc */\r
22 .ascii " " /* 1c0 */\r
23 .ascii " "\r
24 .ascii "JUE " /* 1f0 */\r
25\r
26RST:\r
27 move.w #0x2700, %sr\r
28\r
29 move.b (0xA10001), %d0\r
30 andi.b #0x0F, %d0\r
31 beq.s 0f\r
32 move.l #0x53454741, (0xA14000) /* 'SEGA' */\r
330:\r
34 tst.w (0xc00004).l\r
35\r
36 moveq #0, %d0\r
37 movea.l %d0, %a7\r
38 move %a7, %usp\r
39# move.w #0x2000, %sr\r
40 jsr main\r
410:\r
42 bra 0b\r
43\r
44#HBL:\r
45#VBL:\r
46# rte\r
47\r
48pre_exception:\r
49 move.w #0x2700, %sr\r
50 movem.l %d0-%d7/%a0-%a7,-(%sp)\r
51 move.l %sp, %d0\r
52 move.l %d0,-(%sp)\r
53 jsr exception\r
540:\r
55 bra 0b\r
56\r
57.macro exc_stub num\r
58exc\num:\r
59 move.w #0x\num, -(%sp)\r
60 jmp pre_exception\r
61.endm\r
62\r
63exc_stub 02\r
64exc_stub 03\r
65exc_stub 04\r
66exc_stub 05\r
67exc_stub 06\r
68exc_stub 07\r
69exc_stub 08\r
70exc_stub 09\r
71exc_stub 0a\r
72exc_stub 0b\r
73exc_stub 0c\r
74exc_stub 0d\r
75exc_stub 0e\r
76exc_stub 0f\r
77exc_stub 10\r
78exc_stub 11\r
79exc_stub 12\r
80exc_stub 13\r
81exc_stub 14\r
82exc_stub 15\r
83exc_stub 16\r
84exc_stub 17\r
85exc_stub 18\r
86exc_stub 19\r
87exc_stub 1a\r
88exc_stub 1b\r
89HBL:\r
90exc_stub 1c\r
91exc_stub 1d\r
92VBL:\r
93exc_stub 1e\r
94exc_stub 1f\r
95exc_stub 20\r
96exc_stub 21\r
97exc_stub 22\r
98exc_stub 23\r
99exc_stub 24\r
100exc_stub 25\r
101exc_stub 26\r
102exc_stub 27\r
103exc_stub 28\r
104exc_stub 29\r
105exc_stub 2a\r
106exc_stub 2b\r
107exc_stub 2c\r
108exc_stub 2d\r
109exc_stub 2e\r
110exc_stub 2f\r
111exc_stub 30\r
112exc_stub 31\r
113exc_stub 32\r
114exc_stub 33\r
115exc_stub 34\r
116exc_stub 35\r
117exc_stub 36\r
118exc_stub 37\r
119exc_stub 38\r
120exc_stub 39\r
121exc_stub 3a\r
122exc_stub 3b\r
123exc_stub 3c\r
124exc_stub 3d\r
125exc_stub 3e\r
126exc_stub 3f\r
127\r
128# vim:filetype=asmM68k:ts=4:sw=4:expandtab\r