The MASM Forum

64 bit assembler => UASM Assembler Development => Topic started by: JK on August 26, 2020, 09:53:18 PM

Title: Limits and restrictions
Post by: JK on August 26, 2020, 09:53:18 PM
Is there an upper limit of source lines per file or per project for UASM? In other words, how many lines of code can be assembled to one single object file, and is it possible to have all of these lines in one single code file, or must long code files be split into smaller pieces and be combined by "include"?

If there are limits, what are they? Are there differences to MASM?


JK
Title: Re: Limits and restrictions
Post by: Adamanteus on August 26, 2020, 10:12:42 PM
 This limits is CPU cache, that require aligment on 4-16 bytes of any code label - that's supply by linker, but also and object code size of each program module, that must not exceed minimal CPU cache size on user machine - so, for any hardware it's 32 Kb.
Determine size of code is need periodicaly by map-file of program.
Title: Re: Limits and restrictions
Post by: jj2007 on August 26, 2020, 10:32:08 PM
Building RichMasm with 21,000+ lines, 650kBytes takes 1.7 seconds. I doubt there is a limit.
Title: Re: Limits and restrictions
Post by: HSE on August 26, 2020, 10:51:52 PM
There is limits. I think UASM default is 4 MB. You can rebuild UASM with more memory. Number of lines result from dividing total memory by length of lines.
Title: Re: Limits and restrictions
Post by: jj2007 on August 27, 2020, 01:37:20 AM
Quote from: jj2007 on August 26, 2020, 10:32:08 PMI doubt there is a limit.
Quote from: HSE on August 26, 2020, 10:51:52 PMYou can rebuild UASM with more memory.

Our views are only marginally different: if sources with more than 130,000 lines appear in the forum, the UAsm developers will increase the limit.
Title: Re: Limits and restrictions
Post by: KradMoonRa on August 27, 2020, 02:02:37 AM
In my code readings, for file size, uasm has no (?limit) dependent with operation system max memory management / and or cpu bottleneck.
Probably uasm it will hang with files higher than 1GB if all pass's cant fit in memory.
For line and / or macro expansion (that expands in 1 line), the max is 1024 (character's and/or space's in).
Title: Re: Limits and restrictions
Post by: JK on August 27, 2020, 03:25:18 AM
I just created a project of 31 files, 30 of them exactly 100000 lines ("mov eax, 0", file size ~ 1 MB) - it compiles and runs just fine. Of course the code doesn´t do anything useful, but nevertheless it shows, that UASM can process very large files and projects. The resulting exe is nearly 90 MB.


JK
Title: Re: Limits and restrictions
Post by: HSE on August 27, 2020, 04:03:34 AM
Quote from: jj2007 on August 27, 2020, 01:37:20 AM
if sources with more than 130,000 lines appear in the forum, the UAsm developers will increase the limit.

:biggrin: :biggrin: :biggrin:   Older version of ObjAsm Fusion read every include file, read every macro, and if using long lines: not enough memory. Nobody increased any limit, UASM just failed.

Now Biterider reworked ObjAsm to load specifics include files( :eusa_clap:), and UASM (same build with long lines) can assemble same program that failed before.