Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/22/02 10:54
Read: times


 
#27700 - Accessing C constants from inline ASM

I'm a Keil C51 V4.01 user.

Does anybody know how to access C constans (created with #define) from inline assembly code?

I tried this:

#define VALUE 100

#pragma ASM

mov a, #VALUE

#pragma ENDASM

With this code, the C51 preprocessor does not translate the VALUE reference inside the ASM/ENDASM pragmas and then, the assembler reports an "Undefined symbol" error.

I wonder if there is any other way to do this successfully.



List of 5 messages in thread
TopicAuthorDate
Accessing C constants from inline ASM            01/01/70 00:00      
RE: Accessing C constants from inline ASM            01/01/70 00:00      
RE: Accessing C constants from inline ASM            01/01/70 00:00      
RE: Accessing C constants from inline ASM            01/01/70 00:00      
RE: Accessing C constants from inline ASM            01/01/70 00:00      

Back to Subject List