TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: TIM HUTZLER
from: JONATHAN DE BOYNE POLLARD
date: 1997-11-30 17:12:00
subject: Passing args to assemply

 TH> Passing C++ variables to assembley can be tricky.  [...]
 TH> how does one access a class private data member?
There are very few restrictions placed upon the actual representation of 
class instances.  You are guaranteed that non-static data members that are 
not separated by intervening access specifiers will have addresses that 
compare in the same order that they are declared, but not much more.
Specifically, you are not guaranteed *anything* about the location of a 
non-static data member with respect to the start of the class object.  
Although some C++ implementations do document the layout of their class 
objects (MetaWare High C++ devotes a whole section to it, for example) for 
the benefit of those wanting to mix assembly language and C++, they aren't 
required to, and they aren't required to stick to that layout in the future.
 ¯ JdeBP ®
--- FleetStreet 1.19 NR
---------------
* Origin: JdeBP's point, using Squish (2:440/4.3)

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™.