2020-03-25 01:39:02 +03:00
|
|
|
; This is a compliant "kernel" meant for testing purposes.
|
|
|
|
|
|
|
|
; Header
|
2020-03-26 02:46:35 +03:00
|
|
|
section .stivalehdr
|
2020-03-25 01:39:02 +03:00
|
|
|
|
2020-03-26 02:46:35 +03:00
|
|
|
stivale_header:
|
2020-03-26 05:13:19 +03:00
|
|
|
dq stack.top ; rsp
|
2020-03-30 23:27:15 +03:00
|
|
|
dw 0 ; video mode
|
|
|
|
dw 0 ; fb_width
|
|
|
|
dw 0 ; fb_height
|
|
|
|
dw 0 ; fb_bpp
|
2020-03-26 02:46:35 +03:00
|
|
|
|
|
|
|
section .bss
|
|
|
|
|
|
|
|
stack:
|
|
|
|
resb 4096
|
|
|
|
.top:
|
2020-03-25 01:39:02 +03:00
|
|
|
|
|
|
|
section .text
|
|
|
|
|
|
|
|
; Entry point
|
2020-03-25 03:31:59 +03:00
|
|
|
|
2020-03-25 03:04:18 +03:00
|
|
|
global _start
|
2020-03-25 01:39:02 +03:00
|
|
|
_start:
|
2020-03-25 07:19:07 +03:00
|
|
|
mov rax, 'h e l l '
|
|
|
|
mov rbx, 'o w o '
|
|
|
|
mov rcx, 'r l d '
|
2020-03-30 23:27:15 +03:00
|
|
|
mov rdx, 0xb8000
|
2020-03-27 04:10:22 +03:00
|
|
|
mov [rdx], rax
|
|
|
|
mov [rdx+8], rbx
|
|
|
|
mov [rdx+16], rcx
|
2020-03-25 03:04:18 +03:00
|
|
|
jmp $
|