delorie.com/archives/browse.cgi | search |
From: | Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: inline assembly and c struct |
Date: | 31 Jan 2001 14:42:30 GMT |
Organization: | Aachen University of Technology (RWTH) |
Lines: | 18 |
Message-ID: | <95988m$nb6$1@nets3.rz.RWTH-Aachen.DE> |
References: | <957ghs$kl$1 AT news DOT onet DOT pl> |
NNTP-Posting-Host: | acp3bf.physik.rwth-aachen.de |
X-Trace: | nets3.rz.RWTH-Aachen.DE 980952150 23910 137.226.32.75 (31 Jan 2001 14:42:30 GMT) |
X-Complaints-To: | abuse AT rwth-aachen DOT de |
NNTP-Posting-Date: | 31 Jan 2001 14:42:30 GMT |
Originator: | broeker@ |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
aiur9 <aiur9 AT kki DOT net DOT pl> wrote: > How can I get a structure member offset from inline assembly From inside the inline assembly itself: you can't. But you can do one of these, provided you write extended inline assembly: 1) pass in the result of an offsetof() standard C macro call, among the other in-parameters. 2) Instead of a pointer to the enclosing structure, pass in a pointer to the element, instead. In 'raw' inline assembly, neither of the above is possible, I suspect. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |