flat assembler
Message board for the users of flat assembler.
Index
> Main > pre-release: fasm 1.52 Goto page Previous 1, 2, 3 Next |
Author |
|
LiuJunfeng 26 Mar 2004, 13:46
I see, the "load char from base+%-1" and "store char at base+%-1" are symmetric in form. It is nice for translation of data.
|
|||
26 Mar 2004, 13:46 |
|
Tomasz Grysztar 27 Mar 2004, 19:50
Now command line versions accept the memory limit setting switch among the parameters, which allows you to specify limit in kilobytes for the amount of memory fasm will use (the same setting that was already available for a long time in the Win32 GUI version). For example to force fasm to use no more than 1 MB of memory, execute it like this:
Code: fasm -m1024 some.asm some.out (you can put the switch anywhere in the command line, the space between the switch and a number is also allowed). In case of DOS version, this limit may not be obeyed very strictly, as it limits only allocation of extended memory, so if fasm decides to use some conventional memory also, the total amount of memory used may be slightly larger. |
|||
27 Mar 2004, 19:50 |
|
vid 27 Mar 2004, 21:52
great, at least some command line paramters.
what about -p to create result of preprocessing only? like fasm -p:some.pre some.asm some.out or maybe fasm --preprocess some.asm some.pre |
|||
27 Mar 2004, 21:52 |
|
comrade 27 Mar 2004, 22:54
is it possible for store directive to work on later generated labels?
|
|||
27 Mar 2004, 22:54 |
|
Tomasz Grysztar 27 Mar 2004, 23:13
It can store any value (that is it can be any numerical expression), but only into the previously generated code (the same as "load" directive can load bytes only from the code that has already been generated).
|
|||
27 Mar 2004, 23:13 |
|
comrade 27 Mar 2004, 23:20
also, store does not seem to work in PE executable when destination value is in, say, data section, and you attempt to use store directive in code section.
|
|||
27 Mar 2004, 23:20 |
|
Tomasz Grysztar 27 Mar 2004, 23:23
Yes, this is also for the same reason, as with the "load" directive, only the current addressing space (current section) is available, and I'm afraid it's hard to do anything more about it (as there is no way to determine offset in output for the address outside of current addressing space).
|
|||
27 Mar 2004, 23:23 |
|
comrade 27 Mar 2004, 23:26
thanks
it is helpful as it is now even |
|||
27 Mar 2004, 23:26 |
|
Tomasz Grysztar 28 Mar 2004, 11:04
I have tested the fasm-generated MS COFF object files with more than 65535 relocations per section with the LINK and GoLink. Both accepted such object file, but only LINK generated the correct executable, GoLink used only first 65535 relocations, ignoring the rest.
|
|||
28 Mar 2004, 11:04 |
|
Vortex 28 Mar 2004, 14:39
Privalov,
Have you tried also Pelle's MS link compatible linker Polink? _________________ Code it... That's all... |
|||
28 Mar 2004, 14:39 |
|
Tomasz Grysztar 28 Mar 2004, 21:25
No, can you try it for me?
BTW (and now for something completely different), please note that now fasm supports the regular INCLUDE variable, which can be shared with other compilers (any number of paths separated with semicolons is allowed). So you can add your fasm's include directory to the list in the INCLUDE variable, and - for instance - use: Code: include 'win32a.inc' include 'macro/if.inc' instead of: Code: include '%fasminc%/win32a.inc' include '%fasminc%/macro/if.inc' (but note that you need to keep FASMINC variable to keep some of those includes working properly). |
|||
28 Mar 2004, 21:25 |
|
Tomasz Grysztar 28 Mar 2004, 21:54
The floating point numbers starting with dot are now finally disallowed completely (thanks to vid's suggestion), to avoid confusion with the local labels and errors due to processing them inside structure macros. Now only symbols starting with a decimal digit are considered a numbers.
Also, as a part of syntax cleaning I'm considering removing the "load from file" syntax (to make it with "store" a clean pair of dual directives), because you can still do the same task with code like: Code: virtual at 0 file 'file.txt':2,4 load a dword from 0 end virtual But I understand that actually removing some feature would be treated as a strange idea, so if there's much of protestation, I will abandon this concept. Last edited by Tomasz Grysztar on 28 Mar 2004, 23:19; edited 1 time in total |
|||
28 Mar 2004, 21:54 |
|
comrade 28 Mar 2004, 22:38
If you can encapsulate it in a macro with parameters exactly as the obsolete "load from file" directive, then I do not see much trouble
|
|||
28 Mar 2004, 22:38 |
|
Tomasz Grysztar 28 Mar 2004, 23:05
The simplest variant:
Code: macro loadconst const,place { if place eqtype 0 load const From place else virtual at 0 file place load const From 0 end virtual end if } macro load [arg] { from fix , loadconst arg from fix From } From fix from Last edited by Tomasz Grysztar on 29 Mar 2004, 20:25; edited 1 time in total |
|||
28 Mar 2004, 23:05 |
|
hGoblin 03 Apr 2004, 04:36
I've just tried to compile all my fasm projects with fasm 1.52.
With old includes the result is the same as with old fasm (and the same bugs), with new includes it says 'Unexpected end of file'. I cant realize why. I have no time to search forum for known bugs, so sorry, if i repeat after somebody. The procs with alone parameter, e.g. Code: proc F, x:DWORD enter mov eax,[x] return are compiled to code, similar this: Code: ... mov eax, [ebp+(!!!)C(!!!)] ... , when x is ebp+8. procs, having more than one parameter, compiles to right code. It's a problem of both fasm 1.51 and 1.52a2 (with old includes). Maybe this bug is in a macros? |
|||
03 Apr 2004, 04:36 |
|
madmatt 03 Apr 2004, 07:29
How about an enum directive?
It would work the same as c/c++: enum var1=5,var2,var3,var4 equals: var1=5 var2=6 var3=7 var4=8 another way: enum var1=5,var2,var3=10,var4 equals: var1=5 var2=6 var3=10 var4=11 or with step value: enum 5,var1=15,var2,var3,var4 equals: var1=15 var2=20 var3=25 var4=30 |
|||
03 Apr 2004, 07:29 |
|
Madis731 03 Apr 2004, 09:57
The last one seems nice addition, but to my mind it is the ground for macros. This is a gadget, not a feature!
|
|||
03 Apr 2004, 09:57 |
|
Tomasz Grysztar 03 Apr 2004, 11:12
x:DWORD? Are you sure it's fasm syntax?
Also don't forget the "endp" at the end of proc when you're using new macros. madmatt: look here: http://board.flatassembler.net/topic.php?t=826 |
|||
03 Apr 2004, 11:12 |
|
hGoblin 03 Apr 2004, 12:56
Privalov
x:DWORD? Are you sure it's fasm syntax? But fasm have no claims to this code. At least before 1.52. On the contrary, some procs couldn't be compiled w/o dword. However, deleting dwords helps. I guessed, bug is in my brain.... adding endp helps to get rid of 'Unexpected end..', but caused no less obsure errors. I'll wait for official release. |
|||
03 Apr 2004, 12:56 |
|
Goto page Previous 1, 2, 3 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.