about summary refs log tree commit diff stats
path: root/apps
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-09-14 21:14:04 -0700
committerKartik Agaram <vc@akkartik.com>2020-09-14 21:14:04 -0700
commit6b41ca6d95bf6dbafab3fdc85d7355ac8b365931 (patch)
treeffab6daf3af380a661185d9b072d64640194c65c /apps
parent40d40b83decac3d4f9a3da2dc222d19d1ab704f1 (diff)
downloadmu-6b41ca6d95bf6dbafab3fdc85d7355ac8b365931.tar.gz
6777
Print answers in decimal in apps/arith.mu
Diffstat (limited to 'apps')
-rw-r--r--apps/arith.mu17
-rwxr-xr-xapps/mubin389284 -> 389400 bytes
2 files changed, 8 insertions, 9 deletions
diff --git a/apps/arith.mu b/apps/arith.mu
index ebc9850c..fdf97213 100644
--- a/apps/arith.mu
+++ b/apps/arith.mu
@@ -4,7 +4,6 @@
 #   https://compilers.iecc.com/crenshaw
 #
 # Limitations:
-#   Reads numbers in decimal, but prints numbers in hex :(
 #   No division yet.
 #
 # To build:
@@ -14,19 +13,19 @@
 #   $ ./a.elf
 #   press ctrl-c or ctrl-d to exit
 #   > 1
-#   0x00000001
+#   1
 #   > 1+1
-#   0x00000002
+#   2
 #   > 1 + 1
-#   0x00000002
+#   2
 #   > 1+2 +3
-#   0x00000006
+#   6
 #   > 1+2 *3
-#   0x00000007
+#   7
 #   > (1+2) *3
-#   0x00000009
+#   9
 #   > 1 + 3*4
-#   0x0000000d
+#   13
 #   > ^D
 #   $
 #
@@ -46,7 +45,7 @@ fn main -> exit-status/ebx: int {
     compare look, 0
     break-if-=
     # print
-    print-int32-hex 0, n
+    print-int32-decimal 0, n
     print-string 0, "\n"
     #
     loop
diff --git a/apps/mu b/apps/mu
index e44e8e4e..5bb5022e 100755
--- a/apps/mu
+++ b/apps/mu
Binary files differ
/a> ^
307745bc ^





ecfbbfb5 ^
58d866d7 ^
ecfbbfb5 ^




58d866d7 ^
ecfbbfb5 ^




58d866d7 ^
ecfbbfb5 ^




58d866d7 ^
ecfbbfb5 ^



9511ff5c ^




996402e8 ^
f16f5690 ^
996402e8 ^


f16f5690 ^




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
89
90