| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | VioGetPhysBuf |
DS>Perhaps I am just showing my inexperience with nonlinear DS>addressing, 3 years of C cobwebs and rust, or just plain DS>being naive... but shouldn't the following two pieces of DS>code generate the same result ? The first one (based on DS>the example you posted) works, the second (very similar to DS>the MAKEP macro) does not. DS> ptr1616 = (void * _Seg16) ( phys.asel[0] << 16 ); DS> VGARAMptr = (void *) ptr1616; DS> VGARAMptr = (void *) ((void * _Seg16) ( phys.asel[0] << 16 )); I'm suspecting that the first code generates a thunk, and that the second one the (void*) overrides the (void * _Seg16) before the thunk is generated. Just a thought. It's stuff like this that drives me mad when I have to do anything unusual in C. You might try looking at an assembly version of the two pieces of code to see what the compiler thinks the difference is. Rob. ___ X SLMR 2.1a X MS: Where do you want to go uhhh... some time next year? --- Maximus/2 2.01wb* Origin: The Idle Task... (604)275-0835 Richmond BC. (1:153/905) SEEN-BY: 270/101 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407 SEEN-BY: 712/515 517 628 704 713/888 800/1 7877/2809 @PATH: 153/905 828 800 270/101 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
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™.