On Mon, Dec 28, 2020 at 07:36:21PM +0100, Bernd Paysan wrote:
> Am Montag, 28. Dezember 2020, 14:08:06 CET schrieb Anton Ertl:
> > We use CSET internally, so we may add a word with its current
> > functionality, but a different name.  The convention would be to call
> > it SET, but I don't want to waste this name on a little-used word;
> > maybe MASK-SET or OR! would be appropriate names.
> 
> I'm for this set:
> 
> : or!   ( x addr -- )    >r r@ @ or   r> ! ;
> : xor!  ( x addr -- )    >r r@ @ xor  r> ! ;
> : and!  ( x addr -- )    >r r@ @ and  r> ! ;

I have now removed CSET CRESET CTOGGLE (may be added after a cooldown
period if there is demand), and added OR! (used in exactly one place
in Gforth), but not XOR! AND! (not used).

> : xorc! ( x c-addr -- )  >r r@ c@ xor r> c! ;
> : andc! ( x c-addr -- )  >r r@ c@ and r> c! ;
> : orc!  ( x c-addr -- )  >r r@ c@ or  r> c! ;

Given that we have C+!, CXOR! CAND! COR! are better names.  Or we
reintroduce CTOGGLE CRESET and CSET after the cooldown.

- anton


Reply via email to