nasmdoc: update the full set of numeric prefix/suffix characters.
authorH. Peter Anvin <hpa@linux.intel.com>
Fri, 7 May 2010 20:12:12 +0000 (13:12 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Fri, 7 May 2010 20:12:12 +0000 (13:12 -0700)
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
doc/nasmdoc.src

index 6e51cf46d70ac33ecbed653f9f53b44114587a2e..f731e73c8cf8d550fbeef6492ac853a9785c2392 100644 (file)
@@ -1464,16 +1464,18 @@ character, string and floating-point.
 
 A numeric constant is simply a number. NASM allows you to specify
 numbers in a variety of number bases, in a variety of ways: you can
-suffix \c{H} or \c{X}, \c{Q} or \c{O}, and \c{B} for \i{hexadecimal},
-\i{octal} and \i{binary} respectively, or you can prefix \c{0x} for
-hexadecimal in the style of C, or you can prefix \c{$} for hexadecimal
-in the style of Borland Pascal. Note, though, that the \I{$,
+suffix \c{H} or \c{X}, \c{D} or \c{T}, \c{Q} or \c{O}, and \c{B} or
+\c{Y} for \i{hexadecimal}, \i{decimal} \i{octal} and \i{binary}
+respectively, or you can prefix \c{0x}, for hexadecimal in the style
+of C, or you can prefix \c{$} for hexadecimal in the style of Borland
+Pascal or Motorola Assemblers. Note, though, that the \I{$,
 prefix}\c{$} prefix does double duty as a prefix on identifiers (see
 \k{syntax}), so a hex number prefixed with a \c{$} sign must have a
 digit after the \c{$} rather than a letter.  In addition, current
-versions of NASM accept the prefix \c{0h} for hexadecimal, \c{0o} or
-\c{0q} for octal, and \c{0b} for binary.  Please note that unlike C, a
-\c{0} prefix by itself does \e{not} imply an octal constant!
+versions of NASM accept the prefix \c{0h} for hexadecimal, \c{0d} or
+\c{0t} for decimal, \c{0o} or \c{0q} for octal, and \c{0b} or \c{0y}
+for binary.  Please note that unlike C, a \c{0} prefix by itself does
+\e{not} imply an octal constant!
 
 Numeric constants can have underscores (\c{_}) interspersed to break
 up long strings.
@@ -1494,7 +1496,9 @@ Some examples (all producing exactly the same code):
 \c         mov     ax,0q310        ; hex yet again
 \c         mov     ax,11001000b    ; binary
 \c         mov     ax,1100_1000b   ; same binary constant
+\c         mov     ax,1100_1000y   ; same binary constant once more
 \c         mov     ax,0b1100_1000  ; same binary constant yet again
+\c         mov     ax,0y1100_1000  ; same binary constant yet again
 
 \S{strings} \I{Strings}\i{Character Strings}