flat assembler
Message board for the users of flat assembler.
Index
> Main > Help about muti struct |
Author |
|
AsmGuru62 10 Oct 2011, 11:25
FASM can do any C/C++ code, like any other assembler.
Code: virtual at 0 myStruct0: .A dd ? .B dd ? end virtual virtual at 0 myStruct1: .A dd ? .C dd ? .B dd ? end virtual ; ; DATA SECTION ; AAr dd 11,12,13 ; ; CODE SECTION ; mov esi, AAr push 1 pop ecx call test nop ; <-- STOP IN DEBUGGER HERE AND SEE EAX dec ecx call test nop ; <-- STOP IN DEBUGGER HERE AND SEE EAX ; ; FUNCTION test ; test: ; ; ESI = lp ; ECX = flag ; jecxz .esi_ptr_to_myStruct0 mov eax, [esi + myStruct1.B] ret .esi_ptr_to_myStruct0: mov eax, [esi + myStruct0.B] ret |
|||
10 Oct 2011, 11:25 |
|
goldenspider 10 Oct 2011, 11:40
Thanks AsmGuru62, cool.
|
|||
10 Oct 2011, 11:40 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.