stkarm/src/kernel.s

40 lines
528 B
ArmAsm
Raw Normal View History

2018-12-30 22:07:00 +00:00
.data
godot_msg:
.string "Waiting for Godot"
2018-12-28 08:20:09 +00:00
.text
.balign 4
2018-12-28 08:20:09 +00:00
.global _start
_start:
/* Initialize stack pointers */
ldr sp, =stack_svc
cps #0x1b
ldr sp, =stack_und
cps #0x17
ldr sp, =stack_abt
cps #0x12
ldr sp, =stack_irq
cps #0x11
ldr sp, =stack_fiq
2018-12-28 08:20:09 +00:00
// Leave in sys mode
cps #0x1f
ldr sp, =stack_sys
// Leave in usr mode
// cps #0x10
// ldr sp, =stack_usr
/* C-Main */
bl main
2018-12-28 08:20:09 +00:00
2018-12-30 22:07:00 +00:00
ldr r0, =godot_msg
bl printkl
/* Endless busy loop */
b .
2018-12-30 22:07:00 +00:00