aboutsummaryrefslogtreecommitdiff
path: root/src/kernel.S
blob: f82d62421ddda855983586e4ebba6864022c5169 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
.section ".text.kernel"

.globl kernel_main
kernel_main:
	push {lr}
	bl uart_init
	bl enable_irq
	ldr r0, =os_info
	bl uart_string
	mov r0, #0x00
kernel_main.a:
	cmp r0, #0x100
	beq kernel_main.b
	bl uart_char
	add r0, #1
	b kernel_main.a
kernel_main.b:
	mov r0, #0x0A
	bl uart_char
kernel_main.loop:
	bl io_halt
	b kernel_main.loop
	pop {lr}

.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"