then I do a get mode info (4f01) for mode 0x101 (640x480x8) and the resulting values loaded into my struct are as follows:
640 x 640 x 16
Umm what gives?? ??? ??? ???
Code: Select all
_VesaModeTest: ; int (4b pointer, int mode)
push bp
mov bp, sp
;Takes the pointer of the passed struck and runs it.
mov ax, ds
mov es, ax
mov ax, [BP+4]
mov di, ax
mov ax, 4F01h
mov cx, [BP+6]
int 10h
cmp ax, 004fh
je .1
mov ax, -1
mov sp, bp
pop bp
ret
.1
; Vesa Seems ok Return the video given
mov ax, cx
mov sp, bp
pop bp
ret
Code: Select all
if (VesaModeTest(&mib,0x101) == 0x101) printf("%i x %i x %i\n",mib.XResolution,mib.YResolution,mib.BitsPerPixel);
Any Ideas?
Rich
P.S.
Thanks to Pype.Clicker for the idea of calling the vesa functions in external asm code.