Thread View: alt.msdos.programmer
1 messages
1 total messages
Started by Mika Rasimus
Mon, 27 Jul 1998 00:00
Changed DJGPP to Visual C++
Author: Mika Rasimus
Date: Mon, 27 Jul 1998 00:00
Date: Mon, 27 Jul 1998 00:00
32 lines
1914 bytes
1914 bytes
When I wanted to load Vesa's VbeInfoBlock with DJGPP-compiler, I used to do
following code:
void GETVIB(void)
{
int seg, off;
if (vib) delete vib;
vib=0;
__dpmi_regs r;
/* RM seg:offset for transfer buffer */
seg = (__tb & 0xffff0000) >> 4; // This means a segment in
absolute 16-bit
off = (__tb & 0x0000ffff); // flat real-mode
address-space.
/* request VBE information */
_farpokel(_dos_ds, __tb, 0x32454256); // Signature "VBE2"
r.x.di = off;
r.x.es = seg;
r.x.ax = 0x4f00;
__dpmi_int(0x10, &r); // Make 16-bit real
mode interrupt call
if ((r.x.ax==0x004f) &&(_farpeekw(_dos_ds, __tb+4)>=0x0200))
{
vib=new VbeInfoBlock;
dosmemget(__tb, sizeof(struct VbeInfoBlock), vib); // Copy VIB to
memory that
// C++ can use.
}
}
Now... How I do same thing with Microsoft Visual C++?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads