flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
LocoDelAssembly 07 Jul 2007, 15:13
You can use
Code: virtual at esi
.point point ?, ?
end virtual Then, when you do some reference like "mov eax, [.point.y]" it gets translated into "mov eax, [esi+4]". BTW, are you aware of the PROC macro that comes in the fasm package? I you are developing for Windows I suggest you a full read to http://flatassembler.net/docs.php?article=win32 which will simplify your code. |
|||
![]() |
|
vid 07 Jul 2007, 15:33
realcr: do it this way:
Code: struc point x,y { .x dd x .y dd y } virtual at 0 point point ;this declares point.x=0, and point.y=4 end virtual func: label .pnt at ebp+8 enter 0,0 mov esi,[.pnt] ;esi = pointer to pnt structure mov eax, [esi + point.x] mov ebx, [esi + point.y] leave ret |
|||
![]() |
|
realcr 07 Jul 2007, 16:00
Great thanks loco and vid!
I get to learn something new about fasm every time you post a reply. realcr. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.