.data godot_msg: .string "Waiting for Godot" .text .balign 4 .global _start _start: /* Disable IRQ and FIQ */ cpsid if /* Initialize stack pointers */ cps #0x13 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 cps #0x1f ldr sp, =stack_sys // Leave in usr mode // cps #0x10 // ldr sp, =stack_usr /* Enable Vector Table BAR remapping (clears bit 13 of SCTLR) */ mrc p15, 0, r0, c1, c0, 0 and r0, #0xffffdfff mcr p15, 0, r0, c1, c0, 0 /* Sets VBAR with custom vector table's address */ ldr r0, =vectab mcr p15, 0, r0, c12, c0, 0 /* Enable IRQ and FIQ */ cpsie if /* C-Main */ bl main ldr r0, =godot_msg bl printkl /* Endless busy loop */ b .