flat assembler
Message board for the users of flat assembler.
Index
> Main > Large project specifics... |
Author |
|
Tomasz Grysztar 28 Jan 2004, 20:03
AsmGuru62 wrote: The question is You can make a label local by putting the dot at the beginning (see sixth paragraph of section 1.2.3 in fasm's docs). AsmGuru62 wrote: Is there any limits on identifiers? How many can there be? Yes, only the amount of allocated memory limits you. With fasmw you can manually adjust the amount of memory that fasm might use, in the "Compiler" dialog; other versions just try to allocate as much of your memory as possible for that purpose (but DOS version is generally limited to 64 MB). AsmGuru62 wrote: Does the alignment of code/data is done using RB directive with '$' There is ALIGN directive in fasm, for both data and code alignment (see 2.2.3 in docs). AsmGuru62 wrote: Is it possible to attach the RES file into FASM-compiled executable. Yes, you can do it with "resource from" construction (see 2.4.2 in docs - I'm sorry there are no examples, I really should work a bit more on that part of docs...). AsmGuru62 wrote: How to deal with local variables? Say, I have a macro to reserve some Standard stdcall macros allow you to define local variables just this way: Code: proc MyProc, arg1,arg2 .local1 dd ? .local2 dd ? enter ; push ebp / mov ebp,esp / sub esp,8 mov eax,[.local1] ; mov eax,[ebp-8] mov eax,[.local2] ; mov eax,[ebp-4] mov eax,[arg1] ; mov eax,[ebp+8] mov eax,[arg2] ; mov eax,[ebx+4] return ; leave / ret 8 If you prefer to have your own proc macro, please look at the STDCALL.INC file in fasmw release to see how it is done. Please also look at the Fresh project sources at http://fresh.flatassembler.net - this is a quite good example of large project developed with fasm. |
|||
28 Jan 2004, 20:03 |
|
AsmGuru62 28 Jan 2004, 22:12
Thanks!
That was fast... and useful. Just one thing: I, probably, use some EBP/ESP manupulations instead of LEAVE instruction. The compilers no longer use that, but instead the stack frame is restored with a different (maybe, faster) code. I understand that 1 BYTE of LEAVE will expand to 3 or more, but that does not matter much, because the project fucntions (only the frequent ones...) will be aligned anyway... |
|||
28 Jan 2004, 22:12 |
|
Tomasz Grysztar 28 Jan 2004, 23:45
On my processor LEAVE executes in the same amount of cycles as MOV ESP,EBP + POP EBP, and it's still simpler and smaller.
|
|||
28 Jan 2004, 23:45 |
|
AsmGuru62 29 Jan 2004, 15:15
I tried this:
Code: proc foo .wcls WNDCLASS ? enter mov [.wcls.style],CS_VREDRAW return Did not compile... Any workaround? |
|||
29 Jan 2004, 15:15 |
|
decard 29 Jan 2004, 15:53
instead of
Code: .wcls WNDCLASS ? try: Code: .wcls WNDCLASS regards |
|||
29 Jan 2004, 15:53 |
|
AsmGuru62 29 Jan 2004, 16:48
Awesome!
|
|||
29 Jan 2004, 16:48 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.