I am using Tasm and been having this Illegal Number error when using and bl, 0xdf. I have tried adding '0' before the 'df' since according to others, this matters as well. Why do I get this error?
p1:
mov ah, 2
mov dl, 10
int 21h
mov ah, 9
lea dx, d
int 21h
mov ah, 1
int 21h
mov bl, al
p2:
mov ah, 2
mov dl, 10
int 21h
mov ah, 9
lea dx, e
int 21h
mov ah, 1
int 21h
mov bh, al
round:
mov ah,2
and bl, 0xdf
cmp bl, 'R'
je p1R
cmp bl, 'P'
je p1P
cmp bl, 'S'
je p1S
TASM is using the format ..h
for hexadecimal numbers, not 0x..
.
Write the constant as 0dfh
, similar to how you have written the other constants (like 21h).