|
<Range mode intro snipped>
> Could I define a word like this using C@ and C!?
>
> : Set_Range_Long ( -- )
> HEX
> ffb7 C@ fffe AND ffb7 C! ;
I'd redefine it something like this....use upper case
BASE @ HEX \ To keep from evaluating HEX every time...
: RANGE_SET ( f -- ) \ non-zero is long, 0 is short
>R FFB7 DUP C@
R> IF FFFE AND
ELSE 0001 OR
THEN SWAP C! ;
BASE !
> Great work BTW, keep it up!
>
> Puzzling out the multitasking stuff,
Yeah, a tutorial on realtime would be a good idea......
Cheers,
Ralph Hempel - P.Eng
--------------------------------------------------------
Check out pbFORTH for LEGO Mindstorms at:
<http://www.hempeldesigngroup.com/lego/pbFORTH>
--------------------------------------------------------
Reply to: rhempel at bmts dot com
--------------------------------------------------------
|
|
Message has 1 Reply: | | Re: Long range IR mode.
|
| (...) Great, much more generalized code. What are the >R and R> words BTW? Did FFB7 C@ . and found the contents to already FE, as in, it appears that the default IR mode is indeed Long to start with. Seems like the effective range is much shorter (...) (25 years ago, 11-Nov-99, to lugnet.robotics.rcx.pbforth)
|
Message is in Reply To:
| | Re: Long range IR mode.
|
| (...) Just scanned through Kekoka's excellent dissection of the ROM routines. Seems like system variable/register at address $ff7b contains the relevant Long range/Short range bit flag, ie. bit 0 toggles the IR range 0 = Long, 1 = Short. Could I (...) (25 years ago, 9-Nov-99, to lugnet.robotics.rcx.pbforth)
|
6 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|