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 / 4940
4939  |  4941
Subject: 
Re: Some comments (long) (was: Something else is needed, I think...)
Newsgroups: 
lugnet.robotics
Date: 
Fri, 7 May 1999 00:31:34 GMT
Viewed: 
1395 times
  
Chris Phillips <chris.phillips@computerboards.com> wrote:
     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.

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 the result in registers also, something like how the math
routines work now.  Somebody mentioned position independent code (or the
lack thereof); the RCX doesn't support this well because PC-relative
branches only have the range of a signed char.  GCC at least uses absolute
jumps in place of longer branches.

I think inserting native code is getting a bit overkill, but that is just
my $0.02.

   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.

- have you considered writing native code?

   I actually have considered writing native H8 code.  Unfortunately, I have
been stymied by several factors:

I asked the question because, from the things it sounded like you wanted to
do, LegOS might be a better development environment for your needs.  Then
again, you are clearly one of the people who is running into trouble with
the development environment, which can be a complete pain.  (I know how it
is, it took me a while to get it set up on my everyday machine.)

Also, that you want to do firmware development also means you need to get
over the hurdle :)

-Kekoa



Message has 1 Reply:
  Re: Some comments (long) (was: Something else is needed, I think...)
 
(...) 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 (...) (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...)
 
Kekoa Proudfoot wrote in message ... (...) 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 (...) (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
10 hours ago
Custom Search

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