megaed-stop-md - standalone test
[megadrive.git] / megaed-stop-md / sega_gcc.s
diff --git a/megaed-stop-md/sega_gcc.s b/megaed-stop-md/sega_gcc.s
new file mode 100644 (file)
index 0000000..5619334
--- /dev/null
@@ -0,0 +1,41 @@
+    dc.l     0, RST,   exc__, exc__, exc__, exc__, exc__, exc__\r
+    dc.l exc__, exc__, exc__, exc__, exc__, exc__, exc__, exc__\r
+    dc.l exc__, exc__, exc__, exc__, exc__, exc__, exc__, exc__\r
+    dc.l exc__, exc__, exc__, exc__, HBL,   exc__, VBL,   exc__\r
+    dc.l exc__, exc__, exc__, exc__, exc__, exc__, exc__, exc__\r
+    dc.l exc__, exc__, exc__, exc__, exc__, exc__, exc__, exc__\r
+    dc.l exc__, exc__, exc__, exc__, exc__, exc__, exc__, exc__\r
+    dc.l exc__, exc__, exc__, exc__, exc__, exc__, exc__, exc__\r
+\r
+    .ascii "SEGA                            "\r
+    .ascii "MEGA-ED SDRAM vs STOP                           "\r
+    .ascii "MEGA-ED SDRAM vs STOP                           "\r
+    .ascii "GM 00000000-00"\r
+    .byte 0x00,0x00\r
+    .ascii "JD              "\r
+    .byte 0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00\r
+    .byte 0x00,0xff,0x00,0x00,0xff,0xff,0xff,0xff\r
+    .ascii "               "\r
+    .ascii "                        "\r
+    .ascii "                         "\r
+    .ascii "JUE             "\r
+\r
+RST:\r
+    move.w #0x2700, %sr\r
+\r
+    move.b (0xA10001), %d0\r
+    andi.b #0x0F, %d0\r
+    beq.s 0f\r
+    move.l  #0x53454741, (0xA14000) /* 'SEGA' */\r
+0:\r
+    moveq.l #0, %d0\r
+    movea.l %d0, %a7\r
+    move.l  %a7, %usp\r
+    bra     main\r
+\r
+HBL:\r
+VBL:\r
+exc__:\r
+    rte\r
+\r
+# vim:filetype=asmM68k:ts=4:sw=4:expandtab\r