mirror of
https://github.com/remko/waforth
synced 2025-01-13 08:01:32 +01:00
Implement U. natively
This commit is contained in:
parent
29a8f5c518
commit
eaf52649f9
2 changed files with 6 additions and 13 deletions
|
@ -1291,9 +1291,11 @@
|
|||
(data (i32.const 136844) "|\u0016\u0002\u0000\u0004TYPE\u0000\u0000\u0000\u0085\u0000\u0000\u0000")
|
||||
(elem (i32.const 0x85) $TYPE) ;; none
|
||||
|
||||
(func $U. (call $fail (i32.const 0x20084))) ;; not implemented
|
||||
(data (i32.const 136860) "\u008c\u0016\u0002\u0000\u0002_.\u0000\u0086\u0000\u0000\u0000")
|
||||
(elem (i32.const 0x86) $U.) ;; TODO: Rename
|
||||
(func $U.
|
||||
(call $U._ (call $pop) (i32.load (i32.const !baseBase)))
|
||||
(call $shell_emit (i32.const 0x20)))
|
||||
(data (i32.const 136860) "\u008c\u0016\u0002\u0000\u0002U.\u0000\u0086\u0000\u0000\u0000")
|
||||
(elem (i32.const 0x86) $U.)
|
||||
|
||||
;; 6.1.2340
|
||||
(func $U<
|
||||
|
@ -1585,15 +1587,6 @@
|
|||
|
||||
;; High-level words
|
||||
(!prelude #<<EOF
|
||||
\ 6.1.2320
|
||||
: U.
|
||||
BASE @ /MOD
|
||||
?DUP IF RECURSE THEN
|
||||
DUP 10 < IF 48 ELSE 10 - 65 THEN
|
||||
+
|
||||
EMIT
|
||||
;
|
||||
|
||||
\ 6.2.0210
|
||||
: .R
|
||||
SWAP
|
||||
|
|
|
@ -1470,7 +1470,7 @@ function loadTests(wasmModule, arrayToBase64) {
|
|||
expect(output).to.include(
|
||||
"YOU SHOULD SEE THE NUMBER RANGES OF SIGNED AND UNSIGNED NUMBERS:\n SIGNED: -80000000 7FFFFFFF \n"
|
||||
);
|
||||
expect(output).to.include("UNSIGNED: 0/\n");
|
||||
expect(output).to.include("UNSIGNED: 0 FFFFFFFF \n");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue