ibis-os/main.asm

52 lines
658 B
NASM

; Bootloader
%include "boot.asm"
section KERNEL follows=BOOTSECTOR vstart=1000h
%macro mod 2
push ax
push cx
mov cx, %2
xor dx, dx
mov ax, %1
div cx
pop cx
pop ax
%endmacro
main:
mov ax, 0x0013
int 0x10
push es
push 0xa000
pop es
mov di, 0
mov bx, 0
.r:
add bx, 1
.f:
mov byte [es:di], bl
add di, 1
mod di, 320
cmp dx, 0
jnz .f
cmp bx, 200
jnz .r
pop es
jmp $ ; Halt
; Libs
%include "print_util.asm"
%include "time_util.asm"
; Data
HELLO_WORLD:
db 'Hello, world! :D', 0