flat assembler
Message board for the users of flat assembler.

Index > Windows > Out of memory

Author
Thread Post new topic Reply to topic
bobsobol



Joined: 31 May 2010
Posts: 18
Location: U.K.
bobsobol 31 May 2010, 03:12
I have a little project (about 22.4Meg of source code, but about half of that is includes and resources) which reports
Quote:
Error: out of memory
almost immediately even with fasmw set to Memory: 65536.

What can I do?
Post 31 May 2010, 03:12
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 31 May 2010, 04:39
bobsobol wrote:
What can I do?
Read the manual. 65536 means 64 MiB, not a much for serious project.
Post 31 May 2010, 04:39
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20451
Location: In your JS exploiting you and your system
revolution 31 May 2010, 06:22
If you use the console version then more memory is allocated by default.
Post 31 May 2010, 06:22
View user's profile Send private message Visit poster's website Reply with quote
bobsobol



Joined: 31 May 2010
Posts: 18
Location: U.K.
bobsobol 31 May 2010, 19:45
I did read the manual

I assumed that 65536 meant 64Kb actually... but that is as high as it will let me input.

Happy to use the command line version, and slightly wonder why fasmw.exe doesn't just call that when you ask it to "compile" (assemble and link as far as I'm concerned) in the first place.

I have now found that I can actually just type a number far in excess of those available on the drop down, and things proceed much more satisfactorily.

Perhaps just a note to the project that 65536 being the maximum on the drop down is a little slender. Smile
Post 31 May 2010, 19:45
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 31 May 2010, 21:09
You're allowed to write your own amount of memory in FASMW, the drop down list is just a set of predefined memory sizes.
Post 31 May 2010, 21:09
View user's profile Send private message Reply with quote
bobsobol



Joined: 31 May 2010
Posts: 18
Location: U.K.
bobsobol 03 Jun 2010, 12:22
Yes, but pretty low defaults IMHO.

I started out with 131072, which was great. Did some Macros to get around basic syntax differences between my old Assembler and FASM, and then found that (and this isn't mentioned in the manual either) if you use the 5Fh style notation of a hex number it only accepts it as a hex number if the most significant nibble is <= 9, otherwise you have to either add another (more significant) 0 or use the 0x or $ notation. Otherwise it considers the constant to be a label.

Couldn't fix that with a macro (that I could think of) so I did some S&R work and am busy cleaning up the mess of any label that happened to have only the letters A-F preceding an H... like, anything with "_char_" in it becoming "_0xcar_" etc... and several FPU instruction got messed up too. :S

Anyway, I've had to increase to 524288 to keep it building and finding S&R corruptions, but other than that, it's still going quite well, all things considered.

Seems pretty quick, and I'm hoping I can add includes which will let me use conditional compilation to target other platforms besides Win32. Smile

Thanks guys. Very Happy
Post 03 Jun 2010, 12:22
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20451
Location: In your JS exploiting you and your system
revolution 03 Jun 2010, 12:36
bobsobol: All numbers start with a numeric character with the exception of the '$' syntax. This is mentioned in the manual.

Something like bach will be always interpreted as a label because it doesn't start with a number. I am curious to know what assembler you used that interpreted bach as a number?
Post 03 Jun 2010, 12:36
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 04 Jun 2010, 11:24
The very early versions of fasm (prior to 1.04 release) were using case-sensitive format for hexadecimal numbers that didn't require a 0-9 digit as first character. Thus with fasm 1.0 "BACh" was interpreted as hexadecimal number, but "bach" was still a label.

Anyway, since the 1.04 release fasm follows the widespread standard that numbers have to start with 0-9 character.
Post 04 Jun 2010, 11:24
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20451
Location: In your JS exploiting you and your system
revolution 05 Jun 2010, 02:29
I think if I had come across fasm during the time before 1.04 I would have baulked at the idea of numbers starting with letters! Luckily I came in later and didn't have to suffer such "problems".
Tomasz Grysztar wrote:
Anyway, since the 1.04 release fasm follows the widespread standard that numbers have to start with 0-9 character.
Well, except for the time when a dot (.) was allowed to start floating point numbers. I remember when .e and .f would be interpreted as numbers.
Post 05 Jun 2010, 02:29
View user's profile Send private message Visit poster's website Reply with quote
bobsobol



Joined: 31 May 2010
Posts: 18
Location: U.K.
bobsobol 05 Jun 2010, 20:29
Yea... well the MASM copy I have accepted it, but a lot of the code comes from a Reverse since the source was "lost"... the DA produced code like this
Code:
 L0053668F:
              or      ebx,FFFFFFFFh
               push    ebx
    
Which compiled okay with a little coaxing on the linking side... but it's been used as source an man handled considerably, and FFFFFFFFh has remained. I prefer the 0xFFFFFFFF form anyway, so I just made a little program to Search and replace them all in the end.

GREP and SED style S&R just gave be too many PUS0xH, 0xADD, FEX0xCG type mis-replaces. XD I'm sure a GREP or SED GURU could fix it, but I program... so I just wrote an exe. lol
Post 05 Jun 2010, 20:29
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.