amiga_boottest
diff src/startup.s @ 0:51422ea54b9d
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 21 Feb 2018 12:00:13 +0200 |
parents | |
children | 48093e4bd99a |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/startup.s Wed Feb 21 12:00:13 2018 +0200 1.3 @@ -0,0 +1,27 @@ 1.4 +| vi:filetype=gas68k: 1.5 + .text 1.6 + 1.7 + .equ REG_COL0, 0xdff180 1.8 + 1.9 + .global start 1.10 + .global halt_cpu 1.11 + 1.12 +start: 1.13 + | zero the .bss section 1.14 + move.l #_bss_start, %a0 1.15 + move.l #_bss_end, %a1 1.16 + cmp.l %a0, %a1 1.17 + beq.s 1f | skip zeroing if the section is empty 1.18 +0: clr.l (%a0)+ 1.19 + cmp.l %a0, %a1 1.20 + bne.s 0b 1.21 +1: 1.22 + | setup the stack 1.23 + move.l #_stacktop, %sp 1.24 + 1.25 + | test output 1.26 + move.w #0xf0f, REG_COL0 1.27 +0: bra.b 0b | infloop 1.28 + 1.29 +halt_cpu: 1.30 + stop #0x2700