amiga_boottest

annotate 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
rev   line source
nuclear@0 1 | vi:filetype=gas68k:
nuclear@0 2 .text
nuclear@0 3
nuclear@0 4 .equ REG_COL0, 0xdff180
nuclear@0 5
nuclear@0 6 .global start
nuclear@0 7 .global halt_cpu
nuclear@0 8
nuclear@0 9 start:
nuclear@0 10 | zero the .bss section
nuclear@0 11 move.l #_bss_start, %a0
nuclear@0 12 move.l #_bss_end, %a1
nuclear@0 13 cmp.l %a0, %a1
nuclear@0 14 beq.s 1f | skip zeroing if the section is empty
nuclear@0 15 0: clr.l (%a0)+
nuclear@0 16 cmp.l %a0, %a1
nuclear@0 17 bne.s 0b
nuclear@0 18 1:
nuclear@0 19 | setup the stack
nuclear@0 20 move.l #_stacktop, %sp
nuclear@0 21
nuclear@0 22 | test output
nuclear@0 23 move.w #0xf0f, REG_COL0
nuclear@0 24 0: bra.b 0b | infloop
nuclear@0 25
nuclear@0 26 halt_cpu:
nuclear@0 27 stop #0x2700