How to know if an assembly code has particular syntax (emu8086, NASM, TASM, …)?

NASM/YASM is easy to distinguish from MASM/TASM/emu8086. YASM uses NASM syntax, with a few minor differences in what it accepts for constants and directives. I don’t know how to distinguish MASM from TASM, or TASM from emu8086, or FASM, so I’ll leave that for another answer to address. In NASM, explicit sizes on things like … Read more

Why is my assembly output in letter position? (1+1=b)

Your input digits are ASCII characters, so ‘1’ is actually 31h, for example. So when you calculate 1+1 your are getting 31h+31h=62h which is the ASCII character ‘b’. To convert your input digits to their equivalent integer values you need to subtract ‘0’ (30h). Conversely to output integer digits as ASCII characters you will need … Read more