Fix DU<, register 2VARIABLE/2CONSTANT callable — double 27→3
- DU< had same comparison order bug as D< (comparing d2-hi < d1-hi instead of d1-hi < d2-hi). Fixed with SWAP U<. - 2VARIABLE and 2CONSTANT were handled as special tokens but not registered in the dictionary, so they couldn't be called from compiled code (e.g., : CD4 2VARIABLE ;). Added pending codes 9/10.
This commit is contained in:
@@ -118,7 +118,8 @@
|
||||
: M+ S>D D+ ;
|
||||
|
||||
\ DU< ( ud1 ud2 -- flag ) unsigned double-cell less-than
|
||||
: DU< ROT 2DUP = IF 2DROP U< ELSE U< NIP NIP THEN ;
|
||||
\ Compare high cells (unsigned); if equal, compare low cells unsigned.
|
||||
: DU< ROT 2DUP = IF 2DROP U< ELSE SWAP U< NIP NIP THEN ;
|
||||
|
||||
\ ---------------------------------------------------------------
|
||||
\ Phase 3: Mixed arithmetic (built on M* and UM/MOD host primitives)
|
||||
|
||||
Reference in New Issue
Block a user