- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
I would like to know how to get the location of an external variable in asm code so that I have access to reading or writing to that variable. For eg. extern int x; asm ( // I want to move the address of int x to r2 for reading or writing to x ) Any and all help is greatly appreciated ThanxLink Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
oops! I should have combed through the instruction set more closely. I suppose the instruction "movia" comes in handy as follows
extern int x; asm ( " movia r2, x \n\t" "..." )
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page