amiga_boottest

diff src/startup.s @ 1:48093e4bd99a

stuff
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 21 Feb 2018 18:00:45 +0200
parents 51422ea54b9d
children 58ebd84822e7
line diff
     1.1 --- a/src/startup.s	Wed Feb 21 12:00:13 2018 +0200
     1.2 +++ b/src/startup.s	Wed Feb 21 18:00:45 2018 +0200
     1.3 @@ -1,12 +1,16 @@
     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 +	.extern main
    1.12  
    1.13 -start:
    1.14 +	.section .text.startup
    1.15 +
    1.16 +	| enter supervisor mode (assumes VBR=0)
    1.17 +	move.l #super, 0x80
    1.18 +	trap #0
    1.19 +super:
    1.20 +	ori.w #0x0300, %sr	| disable interrupts
    1.21 +
    1.22  	| zero the .bss section
    1.23  	move.l #_bss_start, %a0
    1.24  	move.l #_bss_end, %a1
    1.25 @@ -18,10 +22,10 @@
    1.26  1:
    1.27  	| setup the stack
    1.28  	move.l #_stacktop, %sp
    1.29 +	andi.w #0xf8ff, %sr	| enable interrupts
    1.30  
    1.31 -	| test output
    1.32 -	move.w #0xf0f, REG_COL0
    1.33 -0:	bra.b 0b	| infloop
    1.34 +	jsr main
    1.35 +0:	bra.b 0b
    1.36  
    1.37  halt_cpu:
    1.38  	stop #0x2700