2

I am trying to learn NASM, and I have checked a few tutorials. But some tutorials said that you should write 'mov' while some others said 'MOV' and so on ('int' and 'INT'. Is there a difference?

Erik W
  • 2,590
  • 4
  • 20
  • 33

1 Answers1

4

NASM is not case-sensitive (except for labels and variables) and will gladly accept mov, MOV or Mov as the same opcode.

StenSoft
  • 9,369
  • 25
  • 30
  • Does that apply to hex numbers aswell? – Erik W Feb 12 '15 at 00:43
  • 1
    Yes, you can use 8ah, 8Ah, 8aH or 8AH (or 0x8a, 0h8a etc.) – StenSoft Feb 12 '15 at 00:45
  • 4
    I would rather say that NASM is case sensitive, except for opcodes and numbers. – Macmade Feb 12 '15 at 00:47
  • 2
    And register names and directives and keywords – StenSoft Feb 12 '15 at 00:49
  • Can anyone point to the specific place where this is documented ? Can it be turned on/off as a single blanket behavior ? – User.1 Feb 12 '15 at 02:41
  • Apart from a small note in [its manual page](http://manpages.ubuntu.com/manpages/hardy/man1/nasm.1.html), it doesn't seem to be documented, and except for macros, which can be defined as case-sensitive or case-insensitive, is not possible to be changed. – StenSoft Feb 12 '15 at 08:08
  • Watch out for the "known" section names - `.text`, `.data`, `.bss`, etc. These ARE case sensitive and `section .TEXT` will not do what you want! – Frank Kotler Feb 12 '15 at 11:45