about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--subx/074print-int-decimal.subx30
1 files changed, 30 insertions, 0 deletions
diff --git a/subx/074print-int-decimal.subx b/subx/074print-int-decimal.subx
index e5dbaa30..31999dcd 100644
--- a/subx/074print-int-decimal.subx
+++ b/subx/074print-int-decimal.subx
@@ -178,6 +178,36 @@ test-print-int32-decimal:
     # . end
     c3/return
 
+test-print-int32-decimal-zero:
+    # - check that 0 converts correctly
+    # setup
+    # . clear-stream(_test-stream)
+    # . . push args
+    68/push  _test-stream/imm32
+    # . . call
+    e8/call  clear-stream/disp32
+    # . . discard args
+    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
+    # print-int32-decimal(_test-stream, 0)
+    # . . push args
+    68/push  0/imm32
+    68/push  _test-stream/imm32
+    # . . call
+    e8/call  print-int32-decimal/disp32
+    # . . discard args
+    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
+    # check-stream-equal(_test-stream, "0", msg)
+    # . . push args
+    68/push  "F - test-print-int32-decimal-zero"/imm32
+    68/push  "0"/imm32
+    68/push  _test-stream/imm32
+    # . . call
+    e8/call  check-stream-equal/disp32
+    # . . discard args
+    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               0xc/imm32         # add to ESP
+    # . end
+    c3/return
+
 test-print-int32-decimal-multiple-digits:
     # - check that a multi-digit number converts correctly
     # setup
ent.subx?h=hlt&id=a1305217980a75ed5534daa7016a83f2d5602b43'>^
33352536 ^
cdfb2dbf ^
ee9a9237 ^
33352536 ^
6030d7e2 ^
ee9a9237 ^
6030d7e2 ^
ee9a9237 ^
33352536 ^
71eb22a5 ^
33352536 ^




7dac9ade ^
871d2227 ^
71eb22a5 ^
7a583220 ^
33352536 ^

cdfb2dbf ^
33352536 ^

c98d4b1c ^
33352536 ^
686a52bd ^
f75f333f ^
33352536 ^
7dac9ade ^
33352536 ^


71eb22a5 ^
33352536 ^
71eb22a5 ^
33352536 ^

cf02c20b ^
cdfb2dbf ^
33352536 ^

7a583220 ^
33352536 ^

6030d7e2 ^
871d2227 ^

e5cbbea4 ^
871d2227 ^
f1eade72 ^
6030d7e2 ^
9b16f190 ^
686a52bd ^
6030d7e2 ^
9b16f190 ^
6030d7e2 ^
9b16f190 ^
6030d7e2 ^
9b16f190 ^
6030d7e2 ^
9b16f190 ^
6030d7e2 ^
9b16f190 ^
871d2227 ^
ee9a9237 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88