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