Dear Jan,
thanks for your message.
see my answer below the text.
Jan Kromhout via Amforth-devel writes:
> Hello,
>
>
> After trying for a while, I failed to get these three words together.
> Do not master the bitmask. Despite the examples and the email. Can someone
> please help me with this.
Hello,
After trying for a while, I failed to get these three words together.
Do not master the bitmask. Despite the examples and the email. Can someone
please help me with this.
This is my simple code. The source is from flashForth.
The tree words are setBitmask,clearBitmask and testBitmask.
Th
Hi Jan,
> I need to do a bitmask on register.
The simplest operations are the ones documented
in the source file
\ Use it this way:
\ PORTD 7 portpin: PD.7 ( define portD pin #7)
\ PD.7 high ( turn portD pin #7 on, i.e. set it high-
level)
\ PD.7 low ( turn portD pin
Hello Jan,
> 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 )
> %10 constant mSCK ( PB5 )
>
> I wont
> 1. to set the bits in ddrb with the bitmask mSS
> 2. to clear bits in port
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 fo