flat assembler
Message board for the users of flat assembler.

Index > Main > How many the max length in Fasm?

Author
Thread Post new topic Reply to topic
Fastestcodes



Joined: 13 Jun 2022
Posts: 75
Fastestcodes 23 Aug 2022, 10:06
jumptable dd La00000000,La00000001,...,Lafffffffe,Laffffffff
Is it works?
How many labels can you use in code?

How many 'memory box' can you use in Fasm? I get error with 16384 membox. 8192 membox was good.
Bu0000
...
Bu8192 works.

Bu16384 doesn't work.
Post 23 Aug 2022, 10:06
View user's profile Send private message Reply with quote
macomics



Joined: 26 Jan 2021
Posts: 926
Location: Russia
macomics 23 Aug 2022, 10:10
After starting, fasm shows how much memory it has allocated for work
Code:
flat assembler  version 1.73.30  (10240 kilobytes memory)    

Everything should fit into this volume. That is, until you exceed the amount of memory, the names will work fine.

Next, simple math: 2 * 8192 * 16 + 2 * 8192 * 7 + 3 * 8192 + 4 * 8192 + 8 * 8192 * 32 = 57344 + 131072 + 32768 + 2097152 = 2.414 Mb

8192 * 16 - new line
8192 * 3 - size, byte + string[2] = 'dd' directive
8192 * 7 - size, byte + string[6] = 'BuXXXX' label enumeration
8192 * 16 - new line
8192 * 7 - size, byte + string[6] = 'BuXXXX:' label definition
4 * 8192 - binary data
8 * 8192 * 32 - binary search tree

This I counted approximately only the declaration of the LUT and all the labels listed in it.

And:
N * 8192 - cases


Last edited by macomics on 23 Aug 2022, 10:30; edited 2 times in total
Post 23 Aug 2022, 10:10
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20299
Location: In your JS exploiting you and your system
revolution 23 Aug 2022, 10:20
Code:
~ fasm x
flat assembler  version 1.73.08  (4030244 kilobytes memory)    
4GB
Post 23 Aug 2022, 10:20
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: 20299
Location: In your JS exploiting you and your system
revolution 24 Aug 2022, 01:33
I can get 1M labels in 407MB memory
Code:
rept 1000000 x { z#x: }    
Code:
~ fasm -m 407000 test.asm 
flat assembler  version 1.73.08  (407000 kilobytes memory)
1 passes, 3.3 seconds, 0 bytes.    
Post 24 Aug 2022, 01:33
View user's profile Send private message Visit poster's website 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.