For example for hexadecimal numbers we can use 0x98398 or 8790h.
How can octal numeric constants be written? Does this work?
Depends on the assembler, but most of the assemblers including NASM allow 0o, o standing for octal. Just like you use 0x where x stands for Hexadecimal.
mov ax,310q ; octal
mov ax,310o ; octal again
mov ax,0o310 ; octal yet again
mov ax,0q310 ; octal yet again
Source of information: Here .
Again it's not 0o or the syntax above for all assemblers. It might vary by assemblers , but NASM does indeed use the above-mentioned syntax as you can see the link provided for more information. If you have other assemblers in mind, check out their manuel like for FASM: Here . GAS: Here