Jan, For a general idea on masks you might want to consult p. 92 of "Starting Forth".
If I remember correctly "bitmask:" will create a bitmask, but not do the bit-setting for you. One has to write to the registers to do that (not sure anymore if it is just "c!" or a special version of store for accessing the registers). Peter > On 17 Jun 2019, at 20:13, Jan Kromhout via Amforth-devel > <amforth-devel@lists.sourceforge.net> wrote: > > Hello, > > I need to do a bitmask on register. > > These are the constants, and mask > > $24 constant ddrb > $25 constant portb > > \ bit masks > %000100 constant mSS ( PB2 ) > %100000 constant mSCK ( PB5 ) > > I wont > 1. to set the bits in ddrb with the bitmask mSS > 2. to clear bits in portb with the bitmask mSCK > > In bitnames.frt there is a word bitmask: How can I use it to do > the two actions above? > > This is mor as a learning to understand working with bitmask. > > Thanks for any help. > > Jan > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amforth-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/amforth-devel _______________________________________________ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel