Thanks Frank. That did solve some of the problem. My next problem is when using the %ifidn in testing multiple cases of %2 like I commented below. It doesn't affect my code. What I want to do with the test is to make sure that if any of the tokens (-o,-b,-d,-s) exist, it takes a slightly different path and should affect the other test down below (that prints their base equivalences). Is this even the correct way to use %ifidn? It however works when I used %ifnidn but the code path will produce incorrect result.
%macro reg 1-3
pusha
%ifidn %2,-o || %2,-d || %2,-b || %2,-s ;PROBLEM
push %1
%endif
mov ax,%1
mov si,4
mov bx,16
xor dx,dx
%if %1 == ax
puts "AX:",-line
%elif %1 == bx
puts "BX:",-line
%elif %1 == cx
puts "CX:",-line
%elif %1 == dx
puts "DX:",-line
%elif %1 == di
puts "DI:",-line
%elif %1 == si
puts "SI:",-line
%elif %1 == bp
puts "BP:",-line
%elif %1 == sp
puts "SP:",-line
%elif %1 == cs
puts "CS:",-line
%elif %1 == ds
puts "DS:",-line
%elif %1 == es
puts "ES:",-line
%elif %1 == ss
puts "SS:",-line
%endif
%%begin:
div bx
push dx
xor dx,dx
dec si
test si,si
jz %%conv
jmp %%begin
%%conv:
inc si
pop ax
add al,30h
cmp al,39h
jle %%disp
add al,7
%%disp:
putchar al
cmp si,4
je %%done
jmp %%conv
%%done:
%ifidn %2,-b || -d || -o || -s ;PROBLEM
putchar ' '
putchar '['
pop %1
%else
jmp %%exit
%endif
%ifidn %2,-b
putbin %1,-line
%elifidn %2,-o
putoct %1,-line
%elifidn %2,-d
putint %1,,-line
%elifidn %2,-s
putint %1,-s,-line
%endif
putchar ']'
%%exit:
%ifnidn %3,-line
line
%endif
popa
%endmacro
Thanks for your responds.