TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: JAVIER KOHEN
from: MATHIEU BOUCHARD
date: 1997-08-09 22:09:00
subject: C++ or ASM?

 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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.