From bf7fe756a175a90dd82e970e5d620c6d8c459c17 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Sat, 11 Mar 2023 16:24:25 -0500 Subject: u. um* --- forth/core.fth | 4 ++-- forth/test/core.fr | 25 ++++++++++++------------- 2 files changed, 14 insertions(+), 15 deletions(-) (limited to 'forth') 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 -- cgit v1.2.3