I set the video mode using this:
Code: Select all
mov ax, 0x0013
int 0x10
Code: Select all
;--------------------------------------------------------------
; plotPixel
; Prints a pixel to the screen at a given location
; inputs:
; RAX: Y location
; RBX: X location
;--------------------------------------------------------------
plotPixel:
; [x + y * width] = color
push rdi
mov rdi, VIDEO_COLUMNS
mul rdi ; AX = Y * VIDEO_COLUMNS
add ax, bx ; AX = (Y * VIDEO_COLUMNS) + X
mov rdi, rax
add edi, DWORD [videoMemory]
mov al, BYTE [currentTextColor]
stosb
pop rdi
ret
EDIT: Forgot to mention I'm using Boch's for emulation