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 / 3595
3594  |  3596
Subject: 
Re: NQC v. LegOS / size
Newsgroups: 
lugnet.robotics
Date: 
Tue, 9 Feb 1999 20:40:08 GMT
Original-From: 
John A. Tamplin <jat@traveller&IHateSpam&.com>
Viewed: 
1610 times
  
On Tue, 9 Feb 1999, dave madden wrote:

Yes, the H8 divide instruction can only do (16 bits)/(8 bits), so GCC
calls a helper routine when you attempt to divide an integer by
another integer.  (Same thing with multiplication: the hardware can
only do (8 bits) x (8 bits) -> (16 bits), so GCC often calls a helper
function for that, too.)  Powers of two (division & multiplication)
can be converted to shifts, and multiplication/division by a constant
can often be turned into a combination of shifts and adds; GCC will do
that if it thinks the combination will be more efficient than a
generalized routine.

I haven't had need of any complicated math, so I haven't written the
helper routines; maybe Markus has some.  (Alternatively, I believe
Kekoa identified some math routines in the RCX ROM...it might be
possible to use those.)

Are you linking libgcc.a?  I believe it has all the math helper functions
that are required.

John A. Tamplin Traveller Information Services
jat@Traveller.COM 2104 West Ferry Way
256/705-7007 - FAX 256/705-7100 Huntsville, AL 35801

--
Did you check the web site first?: http://www.crynwr.com/lego-robotics



Message has 1 Reply:
  Re: NQC v. LegOS / size
 
=>From: "John A. Tamplin" <jat@Traveller.COM> =>... =>On Tue, 9 Feb 1999, dave madden wrote: => =>> Yes, the H8 divide instruction can only do (16 bits)/(8 bits), so GCC =>> calls a helper routine [...] => =>Are you linking libgcc.a? I believe it (...) (26 years ago, 9-Feb-99, to lugnet.robotics)

Message is in Reply To:
  Re: NQC v. LegOS / size
 
=>From: Ben Laurie <ben@algroup.co.uk> =>... =>Markus L. Noga wrote: =>> Apart from the limitations imposed by H8 architecture (an 8/16 bit =>> platform with the usual constraints on integer length, available memory =>> and library functions), (...) (26 years ago, 9-Feb-99, to lugnet.robotics)

23 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
14 hours ago
Custom Search

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