diff options
-rw-r--r-- | src/kernel.S | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/kernel.S b/src/kernel.S index 0eb1389..4aa5c2d 100644 --- a/src/kernel.S +++ b/src/kernel.S @@ -5,6 +5,8 @@ kernel_main: push {lr} bl uart_init bl enable_irq + bl enable_fiq + bl check_fiq_status ldr r0, =os_info bl uart_string kernel_main.loop: @@ -12,6 +14,33 @@ kernel_main.loop: b kernel_main.loop pop {lr} +check_fiq_status: + push {lr} + mov r2, #0xB208 + movt r2, #0x3F00 + //mov r3, #57 + //movt r3, #0 + //str r3, [r2] + ldr r3, [r2] + push {r3} + mov r0, r3 + bl uart_hex + pop {r3} + tst r3, #0x80 + beq check_fiq_status.off + ldr r0, =fiq_on + bl uart_string + b check_fiq_status.exit +check_fiq_status.off: + ldr r0, =fiq_off + bl uart_string +check_fiq_status.exit: + pop {pc} + .section ".data" os_info: .asciz "Sergey Bilovytskyy's Real Time Operating System\n Version 0.0a\n Interrupt 01: uart rx interrupt\n Exit : Ctrl-A x\n Monitor : Ctrl-A c\n\n" +fiq_on: + .asciz "\nFIQ - Enabled\n" +fiq_off: + .asciz "\nFIQ - Disabled\n" |