Subject:
|
Re: Assembler
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Wed, 11 Mar 1998 20:52:24 GMT
|
Original-From:
|
Max Davies <{mdavies@cam}StopSpam{.org}>
|
Viewed:
|
1446 times
|
| |
| |
MAR ERICSON wrote:
> Can assembler access an integer variable
> declared in IC?
No, however IC can access an integer value
declared in assembler, which amounts to the same
thing.
Just precede the definitition with the line
variable_C_name, where "C_name" is what you want
the variable to be called in IC. I usually make
the C name the same as the assembler name as in
this example:
variable_global_variable
global_variable FDB 0
.
.
.
LDX global_variable
INX
STX global_variable
----------------
int silly_routine ()
{
global_variable = global_variable + 1;
return(global_variable);
}
-----------------
...Of course you have to load your ICB file before
your C file when you're doing this.
/Max
|
|
Message is in Reply To:
| | Assembler
|
| Can assembler access an integer variable declared in IC? ---...--- ericson mar Master of Engineering Candidate Project: Mobile Robotics mar@cooper.edu (212)353-4356 Department of Mechanical Engineering The Cooper Union for the Advancement of Science (...) (27 years ago, 10-Mar-98, to lugnet.robotics.handyboard)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|