Hi all

Just wondering how many macro locals you can generate before masm freaks out.

I'm writing several macros that will be called extensively and will generate a lot of locals. I
could reduce the local overhead by using global equates but they have the potential of being
overwritten.

Maelstrom
Posted on 2002-08-06 03:02:46 by Maelstrom
For every local MASM gives predefined label like this ??xxxx, where x is 0-Fh.
So, you can use up to 65535 locals.
You can simply prove it assembling below code.
REPEAT 0FFFFh works fine, but REPEAT 10000h generates error at very last repeat.



.386
.model flat, stdcall
option casemap:none

HowMany MACRO
local a
a = 0
% ECHO a
ENDM

.code
start proc

REPEAT 10000h
HowMany
ENDM

start endp
end start
Posted on 2002-08-06 04:05:45 by Four-F
Thanks Four-F

:alright:
Posted on 2002-08-06 04:42:00 by Maelstrom