JK> I was playing with my C++ compiler and I found myself writing this:
JK> v_screen = static_cast
JK> (const_cast(MK_FP(0xA000, 0x0000)));
JK> Complicated? Yes, at least for me. I was curious what the asembly output
JK> will be, so I've got this:
JK> mov dword ptr DGROUP:v_screen,large 0A0000000h
I guess you'll be using standard mode 13h, in which case you don't need
the volatile keyword. in all plane-modes, though, you better use
volatile. Besides, why are you using "const" here???? i'm not familiar
with ANSI C++ casts, but v_screen should be of type:
static unsigned char far * const
(unsigned is optional but generally less hassle, and const is placed
after the *, not before.)
JK> v_screen = 0xA0000000;
JK> portable from 16 bit to 32 bit compilers?
32-bit real mode, yes. both 16-bit PM and 32-bit PM, no.
matju
--- Terminate 4.00/Pro
---------------
* Origin: The Lost Remains Of SatelliteSoft BBS (1:163/215.42)
|