Merge pull request #16 from E-Almqvist/dev

Update
pull/25/head
Elias Almqvist 3 years ago committed by GitHub
commit 326fa0ee2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/bootloader.asm
  2. 18
      src/pm/vga/print.asm

@ -27,7 +27,3 @@ BOOT_DRIVE: db 0
; Bootsector
times 510-($-$$) db 0
dw 0xaa55 ; magic BIOS numbers
; After bootsector
times 256 dw 0xEEEE
times 256 dw 0xAAAA

@ -1,24 +1,26 @@
[bits 32]
; VGA base address: 0xb8000
; Charpos = 0xb8000 + 2 * (row * 80 + col)
; Charpos = 0xb8000 + 2(row*80 + col)
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:
mov al, [ebx]
mov ah, 0x0f
mov al, [ebx] ; Pointer to char
mov ah, [vga_color_buf] ; Color code
cmp al, ASCII_END
je vga_print_return
cmp al, ASCII_END ; Check if end of string
je vga_print_return ; If end then return
mov [edx], ax
inc ebx
mov [edx], ax ; Move charpos
inc ebx ; Increment to next
add edx, 2
jmp vga_print_loop
jmp vga_print_loop ; Loop back until end of string
vga_print_return:
popa

Loading…
Cancel
Save