Permalink
Browse files

followup to Issue 9180

  • Loading branch information...
1 parent 1fcf488 commit 0235fa74a2a91319d15ecc9bb1b9960b22f85a63 @Govelius Govelius committed Dec 28, 2012
Showing with 19 additions and 1 deletion.
  1. +19 −1 iasm.dd
View
20 iasm.dd
@@ -341,7 +341,7 @@ add int ptr [EAX],7 ;
struct Foo { int a,b,c; }
int bar(Foo *f) {
asm {
- mov EBX,f ;
+ mov EBX,f ;
mov EAX,Foo.b.offsetof[EBX] ;
}
}
@@ -351,6 +351,24 @@ void main() {
}
--------------
+ $(P Alternatively, inside the scope of an aggregate, only the member name is needed:)
+
+--------------
+struct Foo { // or class
+ int a,b,c;
+ int bar() {
+ asm {
+ mov EBX, this ;
+ mov EAX, b[EBX] ;
+ }
+ }
+}
+void main() {
+ Foo f = Foo(0, 2, 0);
+ assert(f.bar() == 2);
+}
+--------------
+
<h3>Stack Variables</h3>
$(P Stack variables (variables local to a function and allocated

0 comments on commit 0235fa7

Please sign in to comment.