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 / 3645
3644  |  3646
Subject: 
Re: BrickOS Assembler
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 19 Jan 2004 20:21:32 GMT
Viewed: 
4318 times
  
In lugnet.robotics.rcx.legos, Mark Riley wrote:
In lugnet.robotics.rcx.legos, Michael Purvis wrote:
In lugnet.robotics.rcx.legos, Iain McInnes wrote:

2) Figure out the assembler idiom for referring to symbols and use that.

???

One more answer... :-)

PERFECT. That was exactly what I was looking for. Clearly, the @_variablename
method only works for words and not bytes. This had been my problem. Thanks very
much.

And thanks to everyone else who contributed too... I'm just a sucker for the
easy way out.

Mike



Message has 1 Reply:
  Re: BrickOS Assembler
 
(...) Glad to help! (...) However, it *does* work for bytes... See the program below. In your example program, you declared the "total" variable as an unsigned short (which is a 16-bit word), but accessed it using an 8-bit move instruction. Instead, (...) (21 years ago, 20-Jan-04, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: BrickOS Assembler
 
(...) One more answer... :-) Mark #include <unistd.h> #include <conio.h> int x = 10; int y = 5; int z; int main() { __asm__(" mov @_x,r0 mov @_y,r1 add r1,r0 mov r0,@_z "); lcd_int(z); msleep(5); return 0; } (21 years ago, 19-Jan-04, to lugnet.robotics.rcx.legos)

11 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