1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-26 03:48:05 +11:00

Remove MIN and MAX from core

It isn't used in there anymore. Moved it to VE, the only place
where it's used.
This commit is contained in:
Virgil Dupras 2020-11-08 17:22:54 -05:00
parent 3171b03335
commit 3615944ffa
4 changed files with 2 additions and 4 deletions

View File

@ -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 ;

View File

@ -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 ;

Binary file not shown.

View File

@ -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<a2.
MIN a b -- n Returns the lowest of a and b
MAX a b -- n Returns the highest of a and b
NOT f -- f Push the logical opposite of f
# Strings