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 / 415
414  |  416
Subject: 
Re: Long range IR mode
Newsgroups: 
lugnet.robotics.rcx.pbforth
Date: 
Wed, 27 Dec 2000 22:52:45 GMT
Viewed: 
1727 times
  
I've discovered the RCX is in long range mode UNTIL I send it a POWER_INIT
pbForth command. Pity... what's the way around this, anyone ?

Disclaimer: I didn't try ANYTHING of this...

According to Kekoa's Internals, the ROM routine 0x3250 (0x3266) with
parameter 0x1770 sets the IR range to long (short). So you need to do
something like:

push 0x1770
jsr 0x3250
pop  ; Stack should be cleaned by caller

Either add a word along these lines to pbforth.asm, or try the following
quick hack in forth:

HEX
CREATE ((long))   5E00 , 3250 , 5A00 , ' EXIT ,
: (long)   ((long)) EXECUTE ;
: long   1770 (long) DROP ;

The ((long)) word is: jsr 3250, jmp exit.
(long) does a jmp ((long)) - so the exit in ((long)) actually exits from
(long)! It's a weird hack but the easiest way I could think of to fake a CODE
definition in colon-forth.

BTW, Kekoa says that 0x3250 clears bit 0 of ffb7, and 3266 sets it. Maybe
just doing
HEX FFB7 DUP C@ FE AND SWAP C!
suffices. Just try it or disassemble the function to be sure.

Ernst

--
Ernst de Ridder - hnridder@informatik.uni-rostock.de
Universitaet Rostock - Lehrstuhl fuer Theoretische Informatik
Albert Einstein Str. 21 - D-18051 Rostock - Germany
http://wwwteo.informatik.uni-rostock.de/~hnridder



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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