init/main.68k

30 lines
541 B
Plaintext

include cards.i
include initrd.i
include syscalls.i
section .text,text
public _start
_start:
move.l #tmp_stack_top, a7
; set up a permanent stack
move.l #2, d0
move.l #$2, d1
jsr syscall_vmem_map_free
adda.l #(2*4096), a0
move.l a0, a7
move.l #msg, a0
jsr syscall_println
jsr cards_init
jsr initrd_init
move.l #init_name, a0
jsr initrd_find_file
dbg:
jsr syscall_exit
section .data,data
msg: dc.b "Hello from init",0
init_name: dc.b "init.elf",0
section .bss,bss
tmp_stack: ds.b 32
tmp_stack_top: