diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-10-22 17:34:10 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-10-22 17:34:10 -0700 |
commit | c65a2f634b8ca75cceeb79a9afbc381a7ae0362f (patch) | |
tree | 8da0be6ba7427bdb9aa3298884bce74c2cef30a9 /test/radix.asm | |
parent | bea0bbb62c9947421bc0fddcd2b58a40435e2181 (diff) | |
download | nasm-c65a2f634b8ca75cceeb79a9afbc381a7ae0362f.tar.gz |
Support binary and octal floating-point
For consistency, support binary and octal floating-point, and accept
a "0d" or "0t" prefix for decimal floating-point. However, we do not
accept a binary exponent (p) for a decimal mantissa, or vice versa.
Diffstat (limited to 'test/radix.asm')
-rw-r--r-- | test/radix.asm | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/radix.asm b/test/radix.asm index 35dbceef..c08b5500 100644 --- a/test/radix.asm +++ b/test/radix.asm @@ -1,3 +1,5 @@ + ;; Integer constants... + dd 1010_0101 ; Decimal dd 01010_0101 ; Decimal (*not* octal!) dd 0d1010_0101 ; Decimal @@ -20,4 +22,19 @@ dd 1010_0101h ; Hex dd 1010_0101x ; Hex dd $1010_0101 ; Hex -
\ No newline at end of file + + ;; Floating-point constants + ;; All of these should output B4A21147 + dd 3.7282705e+4 ; Decimal + dd 00003.7282705e+4 ; Decimal + dd 0d3.7282705e+4 ; Decimal + dd 0t3.7282705e+4 ; Decimal + + dd 0x1.23456789p+15 ; Hex + dd 0h1.23456789p+15 ; Hex + + dd 0o1.10642547422p+15 ; Octal + dd 0q1.10642547422p+15 ; Octal + + dd 0b1.0010_0011_0100_0101_0110_0111_1000_1001p+15 ; Binary + dd 0y1.0010_0011_0100_0101_0110_0111_1000_1001p+15 ; Binary |