Files
lk/arch/m68k/start.S
Travis Geiselbrecht 4b508cecc9 [arch][m68k] use a jsr in the initial start routine to main
It's non ideal, since there's no relaxation done in the linker so we
have to assume the branch target is > 16 bits away and do what the
compiler usually does and emit a full 32bit jsr.
2021-06-11 21:34:34 -07:00

34 lines
566 B
ArmAsm

/*
* Copyright (c) 2021 Travis Geiselbrecht
*
* Use of this source code is governed by a MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT
*/
#include <lk/asm.h>
.section .text.boot
FUNCTION(_start)
// clear bss
lea __bss_start,%a0
cmpal #_end,%a0
beqs 1f
0:
clrb %a0@+
cmpal #_end,%a0
bnes 0b
1:
movel #_default_stack_top,%sp
jsr lk_main
jmp .
END_FUNCTION(_start)
.bss
.align 8
_default_stack_base:
.skip 4096
_default_stack_top: