Block 6000 ( forth79.4th -- the FORTH-79 Required Word Set for v4, ) ( as colon definitions, loaded when the system boots. ) ( docs/v4.0.0/NUCLEUS.md. Blocks 6000 up. ) ( A word moves here from the assembled nucleus, v4/capsule, ) ( once its colon definition passes POST. ) Block 6001 ( U* U/MOD -- FORTH-79 unsigned multiply and divide. ) ( Neither v3 nor the v4 nucleus had them. ) ( The first two words count the bits in a cell. ) : (BITS) ( -- n ) 0 1 BEGIN DUP WHILE 2* SWAP 1+ SWAP REPEAT DROP ; (BITS) CONSTANT (NB) VARIABLE (UD) ( u1 u2 -- ud the unsigned double product ) : U* UM* ; Block 6002 ( ud u1 -- u2 u3 unsigned: u2 the remainder, u3 the quotient ) ( One bit a step: shift ud left, and take u1 from its high ) ( cell whenever it goes, counting that in the low cell. ) ( A zero divisor is error 11, Division by zero. ) : U/MOD DUP 0= IF DROP DROP DROP 11 NODE-ERROR ! THEN (UD) ! (NB) 0 DO DUP 0< >R 2* OVER 0< IF 1+ THEN SWAP 2* SWAP R> IF (UD) @ - SWAP 1+ SWAP ELSE DUP (UD) @ U< 0= IF (UD) @ - SWAP 1+ SWAP THEN THEN LOOP SWAP ;