To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.pbforthOpen lugnet.robotics.rcx.pbforth in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / pbFORTH / 179
178  |  180
Subject: 
Re: Long range IR mode.
Newsgroups: 
lugnet.robotics.rcx.pbforth
Date: 
Thu, 11 Nov 1999 07:18:04 GMT
Reply-To: 
nospam-dcchen@pacbell.netIHATESPAM-nospam
Viewed: 
1399 times
  
Ralph Hempel wrote:

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, 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 than let's say NQC's transmission range.  Can you
confirm this?

If this is true, is there an additional ROM call we have to do to set
the
operating IR mode to Long, or does PB Forth handle IR transmissions a
different way that shortens the effective IR range?

Dave



Message has 1 Reply:
  RE: Long range IR mode.
 
(...) The >R and R> words are used as little helpers. The put (or get) the top element of the data stack to the return stack. As long as you dont fiddle with the return stack between uses, they are a great way to do this. The alternative way to code (...) (25 years ago, 11-Nov-99, to lugnet.robotics.rcx.pbforth)

Message is in Reply To:
  RE: Long range IR mode.
 
<Range mode intro snipped> (...) 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! (...) (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
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR