Macro Paramters

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,967件の閲覧回数
admin
Specialist II
Can anyone help in Codewarrior macro paramters?

This is the Macro definition from the Avocet Assembler:

EEBYTES MACRO SYMBOLNM,SYMSIZE

SYMBOLNM EQU EECOUNTR
XDEF SYMBOLNM

EECOUNTR SET EECOUNTR+SYMSIZE

ENDM

I tried translating into Codewarrior assembly like this:

EEBYTES MACRO ;SYMBOLNM,SYMSIZE

\1 EQU \3
XDEF \1

\3 SET (\3+\2)

ENDM

However I come up with several errors. Anyone's help will be greatly appreciated
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,105件の閲覧回数
bigmac
Specialist III
Hello,
 
Your macro seems to assemble as intended, with some attention to layout detail.  You do not identify the error messages that occurred, but primarily, the XDEF and ENDM directives must commence at other than the first column (the place where labels commence).  Additionally, the third parameter (EECOUNTR) must have previously been defined using the SET directive, so that it may be re-defined within the macro.
 
EEBYTES: MACRO ; SYMBOLNM,SYMSIZE
\1:      EQU   \3
         XDEF  \1
\3:      SET   (\3+\2)
         ENDM
 
Whether the colon after each label is present, or not, shouldn't affect the assembly process.
 
Regards,
Mac

Message Edited by bigmac on 2006-11-0402:35 PM

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,106件の閲覧回数
bigmac
Specialist III
Hello,
 
Your macro seems to assemble as intended, with some attention to layout detail.  You do not identify the error messages that occurred, but primarily, the XDEF and ENDM directives must commence at other than the first column (the place where labels commence).  Additionally, the third parameter (EECOUNTR) must have previously been defined using the SET directive, so that it may be re-defined within the macro.
 
EEBYTES: MACRO ; SYMBOLNM,SYMSIZE
\1:      EQU   \3
         XDEF  \1
\3:      SET   (\3+\2)
         ENDM
 
Whether the colon after each label is present, or not, shouldn't affect the assembly process.
 
Regards,
Mac

Message Edited by bigmac on 2006-11-0402:35 PM

0 件の賞賛
返信