summaryrefslogtreecommitdiff
path: root/kernel/src/boot.asm
blob: a10b14c649dc1ceab78c69e0dbc1a1d79eb3f09c (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
global start

section .text
bits 32
start:
	mov esp, stack_top

	; print 'OK'
	mov dword [0xb8000], 0x2f4b2f4f
	hlt

; Prints 'ERR: ' and the given error code to the screen and halts
; parameter: error code letter (ascii) in al
error:
	mov dword [0xb8000], 0x4f524f45
	mov dword [0xb8004], 0x4f3a4f52
	mov dword [0xb8008], 0x4f504f20
	mov byte  [0xb800a], al
	hlt

section .bss
stack_bottom:
	resb 64
stack_top: