当前位置: 首页 > 工具软件 > Marco Polo > 使用案例 >

local in marco

端木高邈
2023-12-01
Macros are expanded directly in code, therefore if there are labels inside the macro definition you may get "Duplicate declaration" error when macro is used for twice or more. To avoid such problem, use LOCAL directive followed by names of variables, labels or procedure names. For example:


MyMacro2    MACRO
	LOCAL label1, label2

	CMP  AX, 2
	JE label1
	CMP  AX, 3
	JE label2
	label1:
		 INC  AX
	label2:
		 ADD  AX, 2
ENDM


ORG 100h

MyMacro2

MyMacro2

RET
 类似资料:

相关阅读

相关文章

相关问答