radix.asm 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. ;Testname=test; Arguments=-fbin -oradix.bin; Files=stdout stderr radix.bin
  2. ;; Integer constants...
  3. dd 1010_0101 ; Decimal
  4. dd 01010_0101 ; Decimal (*not* octal!)
  5. dd 0d1010_0101 ; Decimal
  6. dd 0t1010_0101 ; Decimal
  7. dd 1010_0101d ; Decimal
  8. dd 1010_0101t ; Decimal
  9. dd 0b1010_0101 ; Binary
  10. dd 0y1010_0101 ; Binary
  11. dd 1010_0101b ; Binary
  12. dd 1010_0101y ; Binary
  13. dd 0o1010_0101 ; Octal
  14. dd 0q1010_0101 ; Octal
  15. dd 1010_0101o ; Octal
  16. dd 1010_0101q ; Octal
  17. dd 0h1010_0101 ; Hex
  18. dd 0x1010_0101 ; Hex
  19. dd 1010_0101h ; Hex
  20. dd 1010_0101x ; Hex
  21. dd $1010_0101 ; Hex
  22. db 0h ; Zero!
  23. db 0x ; Zero!
  24. db 0b ; Zero!
  25. db 0dh ; Hex
  26. db 0bh ; Hex
  27. db 0dx ; Hex
  28. db 0bx ; Hex
  29. db 0hd ; Hex
  30. db 0hb ; Hex
  31. db 0xd ; Hex
  32. db 0xb ; Hex
  33. ;; Floating-point constants
  34. ;; All of these should output B4A21147
  35. dd 3.7282705e+4 ; Decimal
  36. dd 00003.7282705e+4 ; Decimal
  37. dd 0d3.7282705e+4 ; Decimal
  38. dd 0t3.7282705e+4 ; Decimal
  39. dd 0x1.23456789p+15 ; Hex
  40. dd 0h1.23456789p+15 ; Hex
  41. dd 0o1.10642547422p+15 ; Octal
  42. dd 0q1.10642547422p+15 ; Octal
  43. dd 0b1.0010_0011_0100_0101_0110_0111_1000_1001p+15 ; Binary
  44. dd 0y1.0010_0011_0100_0101_0110_0111_1000_1001p+15 ; Binary