From cf6b43476e182672b04598da33f084b6e1ac2de0 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sun, 13 Jul 2008 15:55:55 -0700 Subject: [PATCH] doc: document packed BCD constants --- doc/nasmdoc.src | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/doc/nasmdoc.src b/doc/nasmdoc.src index e92e17da..bd1a4b9c 100644 --- a/doc/nasmdoc.src +++ b/doc/nasmdoc.src @@ -127,6 +127,8 @@ in \c{elf} \IR{executable and linkable format} Executable and Linkable Format \IR{extern, obj extensions to} \c{EXTERN}, \c{obj} extensions to \IR{extern, rdf extensions to} \c{EXTERN}, \c{rdf} extensions to +\IR{floating-point, constants} floating-point, constants +\IR{floating-point, packed bcd constants} floating-point, packed BCD constants \IR{freebsd} FreeBSD \IR{freelink} FreeLink \IR{functions, c calling convention} functions, C calling convention @@ -1587,6 +1589,23 @@ respectively. These are normally used as macros: \c \c dq +1.5, -Inf, NaN ; Double-precision constants +\S{bcdconst} \I{floating-point, packed BCD constants}Packed BCD Constants + +x87-style packed BCD constants can be used in the same contexts as +80-bit floating-point numbers. They are suffixed with \c{p} or +prefixed with \c{0p}, and can include up to 18 decimal digits. + +As with other numeric constants, underscores can be used to separate +digits. + +For example: + +\c dt 12_345_678_901_245_678p +\c dt -12_345_678_901_245_678p +\c dt +0p33 +\c dt 33p + + \H{expr} \i{Expressions} Expressions in NASM are similar in syntax to those in C. Expressions -- 2.11.4.GIT