Something not quite right.......

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Matt

Something not quite right.......

Post 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]
Schol-R-LEA

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

Post 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.
Matt

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

Post 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.
Warmaster199

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

Post by Warmaster199 »

[attachment deleted by admin]
Post Reply