Getting VBE framebuffer location returns 0x0000
Posted: Sun Sep 11, 2022 11:07 am
I've made a little piece of code to get me the location of the framebuffer of VBE 0x100 mode
I think i made it all good, but on the screen it only displays "0000", am I doing something wrong?
Code: Select all
[ORG 0x7C00]
[BITS 16]
Main:
mov di, 0xF000 ; just put the info here
mov ax, 0x4F01 ;mode
mov cx, 0x0100 ; video mode number
int 0x10 ;call
cmp ax, 0x004F
jne error ;checks for error
mov ah, 0x0E ; print mode
mov al, [0xF000 + 0x28] ; 1st byte of the adress
and al, 0xF0 ; print 1st char
shr al, 4
add al, 0x30
int 0x10
mov al, [0xF000 + 0x28]
and al, 0x0F
add al, 0x30
int 0x10
mov al, [0xF000 + 0x2A]
and al, 0xF0
shr al, 4
add al, 0x30
int 0x10
mov al, [0xF000 + 0x2A]
and al, 0x0F
add al, 0x30
int 0x10
error:
jmp $
times 510 - ($-$$) db 0
dw 0xAA55