To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcxOpen lugnet.robotics.rcx in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / 1623
1622  |  1624
Subject: 
RE: h8/300 16-bit multiply
Newsgroups: 
lugnet.robotics.rcx
Date: 
Mon, 4 Mar 2002 20:43:03 GMT
Reply-To: 
<rhempel@(stopspam)bmts.com>
Viewed: 
2931 times
  
Thanks.  I have a version just 2 words longer that doesn't use the ROM
code.  Basically it's the ROM's code, trimmed down after assuming high
words are zero initially.  It's completely untested though, so there
may be a bug.

<snipped code...>

Are you sure that it works for signed numbers :-)

Yes, it's for my own Forth; given that it's for Mindstorms, reinventing
the wheel is supposed to be half the fun.

If you like, I can give you some notes on how my Forth was developed.
I'm using a simple pseudo-assembler that lets me port this Forth
to a new processor in less than a day...

By the way:  in your code a "MOV.W #0x0000,r5" takes 4 bytes,
whereas "SUB.W r5,r5" takes only 2 bytes.

Right you are. I may add this to my base in the future...

Cheers, Ralph



Message is in Reply To:
  Re: h8/300 16-bit multiply
 
Thanks. I have a version just 2 words longer that doesn't use the ROM code. Basically it's the ROM's code, trimmed down after assuming high words are zero initially. It's completely untested though, so there may be a bug. CODE UM* \ 16x16=32 (...) (23 years ago, 4-Mar-02, to lugnet.robotics.rcx)

4 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