We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Is there a method for using inline assembly AND the variables passed to it? I understand the requirement for using SRC, but it makes things a wee bit unmaintainable. For example:
void test(char value) { char dummy; #pragma asm mov a,value mov dummy,a #pragma endasm }
?_test?BYTE: value?040: DS 1 ORG 1 dummy?041: DS 1 RSEG ?PR?_test?CREDMSGS USING 0 _test: MOV value?040,R7 ; SOURCE LINE # 172 ; { ; SOURCE LINE # 173 ; char dummy; ; ; #pragma asm ; mov a,value mov a,value ; mov dummy,a mov dummy,a ; #pragma endasm ; } ; SOURCE LINE # 180 RET ; END OF _test
Timing is of high importance (only reason I dropped into ASM in the first place), so no, using the stack is not an option. I need to refer to the params quickly. The compiler doesn't work out the name changes because (my guess at it), the designer opt'ed for a method that reduced the development of the compiler. For the compiler to work things out it has to understand 8051 assembly and THAT makes things more difficult on the compiler writer (otherwise it would just output an OBJ and I would be done!). Thanks for the input, Cheers, Lloyd