Mail Archives: djgpp/1996/11/20/14:07:24
Jaroslav Kamenik wrote:
>
> My code which plays with VESA functions hung at exit.
>
<clip:code>
>
> After printing last mode info, it blew some black lines and hungs.
>
> Stone
I noticed two problems in your code. Firstly, when calling
__dpmi_simulate_real_mode_interrupt, you MUST have SS, SP & the flags
valid, or 0 in which case DPMI will create a 30 byte stack for you. The
reason is that if an interupt occurs, then the flags, CS, and IP will be
pushed into some random memory location!
Secondly, though probably not as important, is that while your VESAInfo
struct is the size of a VBE2 extended VBE info structure (512 bytes),
your only getting the VBE1.? (256 bytes) structure. To get the VBE2
extended VBE info (if it's available), you must place the string 'VBE2'
at the start of the buffer you pass to VBE to fill.
Luke
- Raw text -