|
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 (...) (21 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? (...) (21 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
|
|
|
|