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 / 4941
4940  |  4942
Subject: 
Re: Some comments (long) (was: Something else is needed, I think...)
Newsgroups: 
lugnet.robotics
Date: 
Fri, 7 May 1999 00:47:08 GMT
Viewed: 
996 times
  
Kekoa Proudfoot <kekoa@pixel.Stanford.EDU> wrote:
Chris Phillips <chris.phillips@computerboards.com> wrote:
   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.

Actually, the H8 is worse than this.  It only supports 8-bit multiplies,
storing the result in a 16-bit register.  16-bit and 32-bit operations are
supported in software by routines located in ROM.

I should clarify this.  The 16-bit software multiply takes two 16-bit
numbers and stores their product in a 16-bit number.  The 32-bit software
multiply takes two 32-bit numbers and stores their product in a 32-bit
number.  The operations are intended to support C-style short and long
multiplies.  The upshot is that to do 16-bit fixed point, you have to use
32-bit multiplies.  No biggie, I just didn't want to mislead you into
thinking you could get 64-bit temporaries out of any of this.

-Kekoa



Message is in Reply To:
  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 (...) (25 years ago, 7-May-99, to lugnet.robotics)

42 Messages 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