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 / 3644
3643  |  3645
Subject: 
Re: BrickOS Assembler
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 19 Jan 2004 17:33:30 GMT
Viewed: 
3951 times
  
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... :-)

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;
  }



Message has 1 Reply:
  Re: BrickOS Assembler
 
(...) 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 (...) (20 years ago, 19-Jan-04, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: BrickOS Assembler
 
(...) I need to access elements of a 2d array. I don't think this is an option for that. Nevertheless, could you post code that demonstrates this? (...) How do I do that? (...) ??? (...) Hmm... this sounds more like what I'm trying to do. Someone? (...) (20 years ago, 18-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