39 lines
777 B
ArmAsm
39 lines
777 B
ArmAsm
# 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
|
|
|
|
# -----------------------------------------------------------------------------
|