-=> Quoting Cameron Clark to Javier Kohen
JK> v_screen = static_cast
JK> (const_cast(MK_FP(0xA000, 0x0000)));
JK> I think those C++ casts are purely cosmetic... ;-)
CC> It might seem that way, but using volatile is supposed to
CC> tell the compiler that the contents may change unexpectedly and
CC> it should avoid storing the value in registers.
Right. No caching of the values pointed at by the pointer. We must assume,
also, that v_screen was originally declared as volatile char *.
CC> However, in the above statement, I've no idea what the compiler
CC> is going to thing of a volatile,static,constant pointer to video
CC> memory.
Nope. The const_cast is _removing_ const (since there isn't a const in the
"brackets" ()). The static_cast is doing nothing about static - it's
saying that we're not going to do a runtime check, but a compile time check
to change the volatile void* to volatile char*.
... ARRRRRGGGHHH!!!! ... Tension breaker, had to be done.
--- FastEcho 1.46
---------------
* Origin: House of Fire BBS - Toronto - (416)601-0085 - v.34 (1:250/536)
|