os-core/sys/core.s

39 lines
777 B
ArmAsm
Raw Normal View History

2019-02-23 21:22:20 +01:00
# file: core.s
# project: Löwe OS
# authors: Elias Löwe <elias@lowenware.com>
# -----------------------------------------------------------------------------
.global _core_init
.extern _uart_puts
# -----------------------------------------------------------------------------
.text
_core_init:
# set up stack pointer using x30 register
LDR x30, =0x40001000
MOV sp, x30
bl 1f
1:
LDR x0, =some_int
BL _uart_putx
LDR x0, =greeting
BL _uart_puts
2:
B 2b
# -----------------------------------------------------------------------------
.data
greeting:
.asciz "\nStarting Lowe OS\n"
.equ some_int, 0x1234567890ABCDEF
# -----------------------------------------------------------------------------