MASM では、if...ekse マクロ (高級プログラミング言語に見られるものと同様) を作成できますか? MASM 用の if-else ステートメント マクロはまだ見つかっていませんが、この目的のためのマクロは非常に役立つと思います。
次に示すように、masm で複雑な一連の if ステートメントを簡単に記述できるマクロを見つけることができれば便利です。
;jump to each case here
checkCase1:
cmp theVariable, 5;
jne case1;
checkCase2:
cmp theVariable, var2;
jne case2;
jmp defaultCase; do this if no other statement is true
;each of the cases are handled here
case1:
;handle case 1
jmp checkCase2; //check whether case 2 is true
case2:
handle case 2
jmp endOfStatement;
defaultCase:
;this is the default case
endOfStatement:
;this is the end of the statement