diff --git a/blk/126 b/blk/126 index e27451b..5f4aa91 100644 --- a/blk/126 +++ b/blk/126 @@ -1,5 +1,7 @@ CREATE CMD 2 C, '$' C, 0 C, CREATE PREVPOS 0 , CREATE PREVBLK 0 , +: MIN ( n n - n ) 2DUP > IF SWAP THEN DROP ; +: MAX ( n n - n ) 2DUP < IF SWAP THEN DROP ; : acc@ ACC @ 1 MAX ; : num ACC @ SWAP _pdacc IF ACC ! ELSE DROP THEN ; : nspcs ( n -- , spit n space ) 0 DO SPC LOOP ; diff --git a/blk/354 b/blk/354 index d9512de..90c2ace 100644 --- a/blk/354 +++ b/blk/354 @@ -3,8 +3,6 @@ : 0< 32767 > ; : >= < NOT ; : <= > NOT ; : 0>= 0< NOT ; : >< ( n l h -- f ) 2 PICK > ( n l f ) ROT> > AND ; : =><= 2 PICK >= ( n l f ) ROT> >= AND ; -: MIN ( n n - n ) 2DUP > IF SWAP THEN DROP ; -: MAX ( n n - n ) 2DUP < IF SWAP THEN DROP ; : NIP SWAP DROP ; : TUCK SWAP OVER ; : -^ SWAP - ; : C@+ ( a -- a+1 c ) DUP C@ SWAP 1+ SWAP ; diff --git a/cvm/forth.bin b/cvm/forth.bin index 271113f..086d78c 100644 Binary files a/cvm/forth.bin and b/cvm/forth.bin differ diff --git a/doc/dict.txt b/doc/dict.txt index 6f8ad89..6e64f86 100644 --- a/doc/dict.txt +++ b/doc/dict.txt @@ -213,8 +213,6 @@ Shortcuts: 1+ 2+ 1- 2- =><= n l h -- f Push true if l <= n <= h CMP n1 n2 -- n Compare n1 and n2 and set n to -1, 0, or 1. n=0: a1=a2. n=1: a1>a2. n=-1: a1