Page 1 of 1

Something not quite right.......

Posted: Sat Aug 24, 2002 5:32 pm
by Matt
I found this source code at the end of the VBE 3 pdf documentation. It claimed that this source would use vesa to switch video memory banks, but it doesn't look like it could do that:

set_struc struc
dw ? ;old bp
dd ? ;return addr (always far call)
p_bx dw ? ;reg bx value
p_dx dw ? ;reg dx value
set_struc ends

_setbxdx proc far ;must be far
push bp
mov bp,sp
mov bx,[bp]+p_bx
mov dx,[bp]+p_dx
pop bp
ret
_setbxdx endp


It said this would switch video memory banks, but I'm not quite so sure.... Does this look right? If so, how do I use it? If not, why the hell would VESA put that crap code in the VBE documentation?
[glow=red,2,300]Thanks :D[/glow]

Re:Something not quite right.......

Posted: Sun Aug 25, 2002 8:51 am
by Schol-R-LEA
Nope, it doesn't, but if you re-read the VBE 3 doc, you'll see that it isn't meant to. That assembly fragment is only some support code needed by the much larger (real-mode) C program above it, not a standalone proram in and of itself.

Re:Something not quite right.......

Posted: Sun Aug 25, 2002 1:28 pm
by Matt
Schol-R-LEA wrote: Nope, it doesn't, but if you re-read the VBE 3 doc, you'll see that it isn't meant to. That assembly fragment is only some support code needed by the much larger (real-mode) C program above it, not a standalone proram in and of itself.
Hm.. I see now.

*matt sighs*
I'm still stuck finding out how to use the vesa pmode entry point.

Re:Something not quite right.......

Posted: Tue Aug 27, 2002 6:07 pm
by Warmaster199
[attachment deleted by admin]