flat assembler
Message board for the users of flat assembler.
Index
> Main > Fasm 1.73 virtual and interface |
Author |
|
ProMiNick 09 Feb 2020, 13:46
interface don`t structurize data!!!
so, Som declared as object by single dword(or qword) in eax, and assumed that is pointed to interface structure. But interface self is only abstraction - it is ALWAYS zero based structure. ptrsize=4(32bit)|ptrsize=8(64bit) So Som = eax Som.R = ptrsize*0 Som.P = ptrsize*1 Som.Stop = ptrsize*2 use "call[Som+Im.Stop]" instead. [edited]I a bit hurried: even that is incorrect. in eax+ptrsize located another variable. so we for start should dereference ptr: mov eax,[Som] and only after that call [eax+Som.Stop] ; Som.Stop equal to Im.Stop |
|||
09 Feb 2020, 13:46 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.