aboutsummaryrefslogtreecommitdiffstats
path: root/forth
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2023-03-11 16:24:25 -0500
committerClyne Sullivan <clyne@bitgloo.com>2023-03-11 16:24:25 -0500
commitbf7fe756a175a90dd82e970e5d620c6d8c459c17 (patch)
tree82dab52271f35db08177410ab1ef94cfe1d66be7 /forth
parentf186ff2a22459ebf2fd83b63b66370d018dcbbef (diff)
u. um*
Diffstat (limited to 'forth')
-rw-r--r--forth/core.fth4
-rw-r--r--forth/test/core.fr25
2 files changed, 14 insertions, 15 deletions
diff --git a/forth/core.fth b/forth/core.fth
index a8ccb9d..bbaa67d 100644
--- a/forth/core.fth
+++ b/forth/core.fth
@@ -7,8 +7,8 @@
: cells 2 * ;
: . 0 sys ;
-: emit 1 sys ;
-: u. 4 sys ;
+: u. 1 sys ;
+: emit 2 sys ;
: 1+ 1 + ;
: 1- 1 - ;
diff --git a/forth/test/core.fr b/forth/test/core.fr
index d2724e1..519124d 100644
--- a/forth/test/core.fr
+++ b/forth/test/core.fr
@@ -328,19 +328,18 @@ T{ MID-UINT+1 1 RSHIFT 2 * -> MID-UINT+1 }T
T{ MID-UINT+1 2 RSHIFT 4 * -> MID-UINT+1 }T
T{ MID-UINT+1 1 RSHIFT MID-UINT+1 OR 2 * -> MID-UINT+1 }T
-." HEY! UM* IS NOT IMPLEMENTED!" CR
-\ T{ 0 0 UM* -> 0 0 }T
-\ T{ 0 1 UM* -> 0 0 }T
-\ T{ 1 0 UM* -> 0 0 }T
-\ T{ 1 2 UM* -> 2 0 }T
-\ T{ 2 1 UM* -> 2 0 }T
-\ T{ 3 3 UM* -> 9 0 }T
-\
-\ T{ MID-UINT+1 1 RSHIFT 2 UM* -> MID-UINT+1 0 }T
-\ T{ MID-UINT+1 2 UM* -> 0 1 }T
-\ T{ MID-UINT+1 4 UM* -> 0 2 }T
-\ T{ 1S 2 UM* -> 1S 1 LSHIFT 1 }T
-\ T{ MAX-UINT MAX-UINT UM* -> 1 1 INVERT }T
+T{ 0 0 UM* -> 0 0 }T
+T{ 0 1 UM* -> 0 0 }T
+T{ 1 0 UM* -> 0 0 }T
+T{ 1 2 UM* -> 2 0 }T
+T{ 2 1 UM* -> 2 0 }T
+T{ 3 3 UM* -> 9 0 }T
+
+T{ MID-UINT+1 1 RSHIFT 2 UM* -> MID-UINT+1 0 }T
+T{ MID-UINT+1 2 UM* -> 0 1 }T
+T{ MID-UINT+1 4 UM* -> 0 2 }T
+T{ 1S 2 UM* -> 1S 1 LSHIFT 1 }T
+T{ MAX-UINT MAX-UINT UM* -> 1 1 INVERT }T
\ ------------------------------------------------------------------------
." TESTING DIVIDE: FM/MOD SM/REM UM/MOD */ */MOD / /MOD MOD" CR