Added VGA print SR

pull/13/head
E. Almqvist 4 years ago
parent 1a236b47a4
commit 72ea40c23e
  1. 4
      src/equ/VGA.asm
  2. 0
      src/equ/vga.asm
  3. 25
      src/vga/print.asm

@ -0,0 +1,4 @@
; VGA EQUs
VIDEO_MEM equ 0xb8000

@ -0,0 +1,25 @@
[bits 32]
; VGA base address: 0xb8000
; Charpos = 0xb8000 + 2 * (row * 80 + col)
vga_print:
pusha
mov edx, VIDEO_MEM
vga_print_loop:
mov al, [ebx]
mov ah, 0x0f
cmp al, ASCII_END
je vga_print_return
mov [edx], ax
inc ebx
add edx, 2
jmp vga_print_loop
vga_print_return:
popa
ret
Loading…
Cancel
Save