To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 4937
4936  |  4938
Subject: 
Re: Some comments (long) (was: Something else is needed, I think...)
Newsgroups: 
lugnet.robotics
Date: 
Thu, 6 May 1999 22:51:58 GMT
Viewed: 
1600 times
  
Kekoa Proudfoot wrote in message ...
Some comments on what Chris Phillips wrote:

- as far as I know, you will not be able to implement floating point in
  byte code, it will be too inefficient (mostly in terms of space)

     Do you think it would be possible with improved firmware to support
inline H8 code embedded in a user program?  For example, a special byte code
could indicate that the following code should be executed directly by a
subroutine CALL until it decided to RETurn?  This might allow compilers to
embed high-performance, efficient library code into a user program instead
of relying on the firmware to implement every feature, or byte code
operations to support every possibility.

- agreed, current firmware does not support fixed point well, and it is
  because they do not allow 32-bit values
- yes, you need 32-bit values for usable fixed point in byte code
- muldiv also useful

- muldiv not supported natively by H8


   I'm not surprised that MulDiv isn't supported directly by the H8.  But do
you know if the H8's MULtiply instruction returns a 32-bit value?  (On
16-bit 80x86 processors, for example, this is done using two registers: AX
for the low word and DX for the high word of the result.)  I believe that
this would be a requirement for implementing a MULDIV byte code on the RCX.

- have you considered writing native code?


   I actually have considered writing native H8 code.  Unfortunately, I have
been stymied by several factors:
     1.  The web link from the Lego Mindstorms Internals web page to the
"Download H8 Software Manual" appears to be broken.  I spent awhile scouring
Hitachi's web page for this vital document without success.  (If anyone
knows a current URL for this, I would be eternally grateful.)
     2.  I haven't yet gotten LegOs installed.  I'm not sure if there's a
problem with the latest TAR file that I downloaded, but whenever I try to
expand it, I get errors.  (I am running out of disk space, but it appears
that the TAR file is expanding in size by a factor of ten before that
happens which makes me suspicious that the file might be corrupted.)
     3.  I don't have the GCC environment loaded either.  (What can I say,
I'm a Windows dweeb.)  I've been looking for a good excuse to install Linux
on one of my old machines, and this might be it.

   I do plan on conquering all of these problems in the very near future,
though, since I quickly realized that the standard Lego firmware isn't going
to keep up with me for very long.  And after all, my offer to help write a
new & improved firmware wouldn't hold much water if I wasn't planning to get
set up to write H8 code.



Message has 2 Replies:
  Re: Some comments (long) (was: Something else is needed, I think...)
 
(...) Good idea! I like it! The only problem I can see with this is I'm not sure if the H8 supports position independant code or not. If it does, then there's no problem. (...) (26 years ago, 6-May-99, to lugnet.robotics)
  Re: Some comments (long) (was: Something else is needed, I think...)
 
(...) You might be able to do this if you were clever about it; you might be able to define an opcode that defines a native subroutine that you can call with another opcode, say, that passes in 16- or 32-bit values in registers and expects you store (...) (26 years ago, 7-May-99, to lugnet.robotics)

Message is in Reply To:
  Re: Some comments (long) (was: Something else is needed, I think...)
 
Some comments on what Chris Phillips wrote: - as far as I know, you will not be able to implement floating point in byte code, it will be too inefficient (mostly in terms of space) - agreed, current firmware does not support fixed point well, and it (...) (26 years ago, 6-May-99, to lugnet.robotics)

42 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
    
Active threads in Robotics

 
Verified and Trusted Team of Hackers
11 hours ago
Custom Search

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