News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

maxmacrolevel

Started by HSE, June 30, 2016, 06:15:57 AM

Previous topic - Next topic

HSE

Every time I talk about the high number of macro levels used with ObjAsm32 + SmplMath, I think:

                 what number?

Minor changes in HJWASM code (the only thing I can do):

msgdef.hpick( MSG_ASSEMBLY_RESULTS,   "%s: %lu lines, %u passes, %u ms, %u warnings, %u errors, %u maxmacrolevel" )

globals.h
extern uint_8                techomacro;    /* max macro nesting level *

assemble.c  sprintf( CurrSource, MsgGetEx( MSG_ASSEMBLY_RESULTS ),
             GetFName( ModuleInfo.srcfile )->fname,
             GetLineNumber(),
             Parse_Pass + 1,
             endtime - starttime,
             ModuleInfo.g.warning_count,
             ModuleInfo.g.error_count,
    techomacro);

expans.cuint_8 techomacro; /* hse */

if ( MacroLevel == MAX_MACRO_NESTING ) {
        EmitError( NESTING_LEVEL_TOO_DEEP );
        return( -1 );
    } else {
if (MacroLevel > techomacro){
techomacro = MacroLevel;
}
    }


Very interesting results:

Making all the objects
Integ01.asm: 159 lines, 19 passes, 12032 ms, 0 warnings, 0 errors, 60 maxmacrolevel

Making libraries first
Integ01.asm: 159 lines, 3 passes, 2804 ms, 0 warnings, 0 errors, 41 maxmacrolevel

Well above  default MAX_MACRO_NESTING = 20 for 32 bit, above very close to  MAX_MACRO_NESTING = 40 for 64 bit (and ML).

Regards. HSE
Equations in Assembly: SmplMath

habran

We have increased MAX_MACRO_NESTING in previous releases to 128 but somehow it was changed because we used an older globals.h
We can do that in next release:
#ifdef __I86__
#define MAX_MACRO_NESTING       64
#else
#define MAX_MACRO_NESTING       128 /* macro call nesting  */
#endif
Cod-Father

HSE

Perfect  :t

My MAX_MACRO_NESTING = 340. Obviously is an exaggeration, but I see that now  ;). 

later: using the chinese Biterider libraries (UNICODE) only 27 levels.
Equations in Assembly: SmplMath