icd
asked on
_asm inside a #define
In MSVC 4.1 I can write the following code
__asm {
jb 0x01
jb 0xf9
}
If however I put it into a macro:-
#define OB3 __asm { \
jb 01 \
jb 0xf9 \
}
and then use the macro in my code:-
OB3;
I get an error on each use of the macro.
warning E4405 warning 'jb' is a reserved word
error C2400 inline assembler syntax error in 'first operator'; found 'constant'.
This seems to happen with any assembler I create. How can I generate assembler within a macro?
__asm {
jb 0x01
jb 0xf9
}
If however I put it into a macro:-
#define OB3 __asm { \
jb 01 \
jb 0xf9 \
}
and then use the macro in my code:-
OB3;
I get an error on each use of the macro.
warning E4405 warning 'jb' is a reserved word
error C2400 inline assembler syntax error in 'first operator'; found 'constant'.
This seems to happen with any assembler I create. How can I generate assembler within a macro?
What about the semicolon after the macro?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, that did it.