fix some header mistakes
[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
b40440c4 17 dc.l 0x000000,0x3fffff\r
18 dc.l 0xff0000,0xffffff\r
3ee911dc 19 .ascii "RA"; .byte 0xf8,0x20 /* 1b0 */\r
b40440c4 20 /* retrode compat: wants odd and <= 0xffff */\r
21 dc.l 0x200001,0x20ffff /* 1b4 */\r
3ee911dc 22 .ascii " " /* 1bc */\r
23 .ascii " " /* 1c0 */\r
24 .ascii " "\r
25 .ascii "JUE " /* 1f0 */\r
26\r
27RST:\r
28 move.w #0x2700, %sr\r
29\r
30 move.b (0xA10001), %d0\r
31 andi.b #0x0F, %d0\r
32 beq.s 0f\r
33 move.l #0x53454741, (0xA14000) /* 'SEGA' */\r
340:\r
35 tst.w (0xc00004).l\r
36\r
37 moveq #0, %d0\r
38 movea.l %d0, %a7\r
39 move %a7, %usp\r
40# move.w #0x2000, %sr\r
41 jsr main\r
420:\r
43 bra 0b\r
44\r
45#HBL:\r
46#VBL:\r
47# rte\r
48\r
49pre_exception:\r
50 move.w #0x2700, %sr\r
51 movem.l %d0-%d7/%a0-%a7,-(%sp)\r
52 move.l %sp, %d0\r
53 move.l %d0,-(%sp)\r
54 jsr exception\r
550:\r
56 bra 0b\r
57\r
58.macro exc_stub num\r
59exc\num:\r
60 move.w #0x\num, -(%sp)\r
61 jmp pre_exception\r
62.endm\r
63\r
64exc_stub 02\r
65exc_stub 03\r
66exc_stub 04\r
67exc_stub 05\r
68exc_stub 06\r
69exc_stub 07\r
70exc_stub 08\r
71exc_stub 09\r
72exc_stub 0a\r
73exc_stub 0b\r
74exc_stub 0c\r
75exc_stub 0d\r
76exc_stub 0e\r
77exc_stub 0f\r
78exc_stub 10\r
79exc_stub 11\r
80exc_stub 12\r
81exc_stub 13\r
82exc_stub 14\r
83exc_stub 15\r
84exc_stub 16\r
85exc_stub 17\r
86exc_stub 18\r
87exc_stub 19\r
88exc_stub 1a\r
89exc_stub 1b\r
90HBL:\r
91exc_stub 1c\r
92exc_stub 1d\r
93VBL:\r
94exc_stub 1e\r
95exc_stub 1f\r
96exc_stub 20\r
97exc_stub 21\r
98exc_stub 22\r
99exc_stub 23\r
100exc_stub 24\r
101exc_stub 25\r
102exc_stub 26\r
103exc_stub 27\r
104exc_stub 28\r
105exc_stub 29\r
106exc_stub 2a\r
107exc_stub 2b\r
108exc_stub 2c\r
109exc_stub 2d\r
110exc_stub 2e\r
111exc_stub 2f\r
112exc_stub 30\r
113exc_stub 31\r
114exc_stub 32\r
115exc_stub 33\r
116exc_stub 34\r
117exc_stub 35\r
118exc_stub 36\r
119exc_stub 37\r
120exc_stub 38\r
121exc_stub 39\r
122exc_stub 3a\r
123exc_stub 3b\r
124exc_stub 3c\r
125exc_stub 3d\r
126exc_stub 3e\r
127exc_stub 3f\r
128\r
129# vim:filetype=asmM68k:ts=4:sw=4:expandtab\r