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 / 65
64  |  66
Subject: 
FW: New pbFORTH
Newsgroups: 
lugnet.robotics.rcx.pbforth
Date: 
Tue, 11 May 1999 16:36:40 GMT
Viewed: 
1450 times
  
-----Original Message-----
From: Ralph Hempel [mailto:rhempel@bmts.com]
Sent: Tuesday, May 11, 1999 9:47 AM
To: robots@jpsc.co.uk
Subject: RE: New pbFORTH


John,

Are <# # #> TYPE working properly? I seem to be getting some strangeness.

Am I doing something wrong here (my FORTH is a bit rusty)?

: .VOLTAGE
  RCX_POWER [ HEX ] 4001 POWER_GET
  RCX_POWER @ [ DECIMAL ] 10997 390 */
  <# [CHAR] v HOLD # # # [CHAR] . HOLD #S #> TYPE
;

My FORTH is rusty too. I looked at the source for 15 minutes and did some fiddling
before I saw the 2DROP at the beginning of #>....

If you look at the definition of U. you will see that they put ZERO on the stack
and then do the conversion...

In other words the <# blah blah blah #> sequence expects a double length number
on the stack!!! Referring to my trusted copy of Starting FORTH, this has always
been the case.

This brings up an interesting point, double numbers will have to be stored in
a small-endian word fashion. In other words: LSW,MSW

On a regular (Motorola) implementation, this would be (word big-endial) MSW,LSW
and in the Intel world it would be LLSB,LMSB,LMSB,MMSB (byte small endian)

At this point, I'm not too concerned about doubles, but with all the talk on the
robotics group, fixed vs floating will be an issue...

BTW, do you mind if I forward all our correspondence so far to the lugnet pbforth
group so that others can see some activity?

Cheers,

Ralph Hempel - P.Eng

--------------------------------------------------------
Check out pbFORTH for LEGO Mindstorms at:
<http://www.bmts.com/~rhempel/lego/pbFORTH/default.html>
--------------------------------------------------------
Reply to:      rhempel at bmts dot com
------------------------------------------------------



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