megadrive_test1
diff src/startup.s @ 7:8253942b0a1a
in the middle of something
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 19 Feb 2017 14:00:26 +0200 |
parents | 862f8a034cae |
children |
line diff
1.1 --- a/src/startup.s Sat Feb 11 08:56:42 2017 +0200 1.2 +++ b/src/startup.s Sun Feb 19 14:00:26 2017 +0200 1.3 @@ -4,6 +4,9 @@ 1.4 .global start 1.5 .global halt_cpu 1.6 start: 1.7 + | copy the string 'SEGA' to appease the TMSS 1.8 + move.l 100, 0xa14000 | SEGA is always at address 100 1.9 + 1.10 | copy .data section from ROM to RAM 1.11 move.l #_data_lma, %a0 1.12 move.l #_data_start, %a1 1.13 @@ -24,6 +27,10 @@ 1.14 cmp.l %a0, %a1 1.15 bne.s 0b 1.16 1: 1.17 + 1.18 + | setup the stack pointer stack 1.19 + move.l #_stacktop, %sp 1.20 + 1.21 jsr main 1.22 halt_cpu: 1.23 stop #0x2700