A poorly written OS for the x86 arch. (WIP)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
eOS/bootloader/pm/vga/print.asm

28 lines
541 B

[bits 32]
; VGA base address: 0xb8000
3 years ago
; Charpos = 0xb8000 + 2(row*80 + col)
3 years ago
vga_color_buf: db 0x0f ; Buffer to be changed so that we can choose colors!
vga_print:
pusha
mov edx, VIDEO_MEM
vga_print_loop:
3 years ago
mov al, [ebx] ; Pointer to char
3 years ago
mov ah, [vga_color_buf] ; Color code
3 years ago
cmp al, ASCII_END ; Check if end of string
je vga_print_return ; If end then return
3 years ago
mov [edx], ax ; Move charpos
inc ebx ; Increment to next
add edx, 2
3 years ago
jmp vga_print_loop ; Loop back until end of string
vga_print_return:
popa
ret