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 / 4976
4975  |  4977
Subject: 
H8 & unaligned word accesses
Newsgroups: 
lugnet.robotics
Date: 
Tue, 11 May 1999 13:12:53 GMT
Original-From: 
profesor@sidehack.NOMORESPAMsat.gweep.net
Viewed: 
734 times
  
I discovered an interesting "feature" of the H8 series processors used in
the RCX.  It will only affect people using raw H8 code on the RCX, such as
those of us using LegOS, and perhaps pbforth.

The H8 does not support unaligned word accesses.  If you do a word (16-bit)
access to an unaligned address, the processor actually accesses the previous
address!  This is documented in the H8/300 programming manual (on page 4,
just above figure 1-2).

IE, lets say at address 0 is the following bytes:

0000: 01 02 03 04

If you did a word read from address 0, the H8 would read '0102'.  But, if you
read from address 1, it will also read '0102', not '0203'!!  There does not
appear to be any way to have the processor generate an exception on this
condition to detect it.

Just wanted to let everyone know about this odd "feature"...

-Matt

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



Message has 1 Reply:
  RE: H8 & unaligned word accesses
 
(...) Right you are Matt. This created a bit of trouble when I was porting the original pbFORTH code over to the H8. I THINK this is because the H8 core is extensible to a full 16 bit machine - or even 32. The "8" in H8 is a misnomer except at the (...) (25 years ago, 11-May-99, to lugnet.robotics)

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