To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 3661
3660  |  3662
Subject: 
Re: Further Adventures with Assembler
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Tue, 27 Jan 2004 05:10:30 GMT
Viewed: 
4032 times
  
In lugnet.robotics.rcx.legos, Michael Purvis wrote:

In the middle of an assember block, there's an instruction that moves a value
from an array into a register:

mov.b @(_myglobalarray, r3), r5

The line above should produce an error because you are specifying a byte move
into a word register.  The fact that it doesn't always cause an error makes me
think there's something flakey (in the assembler) in the way instruction operand
sizes are being parsed.  Replace the line with one of the following valid lines
(your pick):

  mov.w @(_myglobalarray, r3), r5
  mov.b @(_myglobalarray, r3), r5l
  mov.b @(_myglobalarray, r3), r5h

BTW, I tend not to use the instruction width modifier ".b" or ".w" when I write
assembly since it is redundant.  The source or target register already implies
the size of the operation to perform.  The result is less typing and less
cluttered looking code (IMO).

Mark



Message has 1 Reply:
  Re: Further Adventures with Assembler
 
(...) Yeah... that was me being stupid. The types are all correct in the program. I tried compiling without the .b and .w's, just to be sure and it's the same error. The arrays that cause the problem are of type const char. There's three that have (...) (20 years ago, 27-Jan-04, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Further Adventures with Assembler
 
Just wanted to thank everyone again for the help on assembler. I've been very successful and managed to greatly increase the speed of a critical portion of my program. However, I'm still having a very bizarre issue: In the middle of an assember (...) (20 years ago, 27-Jan-04, to lugnet.robotics.rcx.legos)

4 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
    

Custom Search

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