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.
I use KeilC uVision4 for 89C51 MCU. By "Inline ASM", i can easily direct write value to R7 register, like this :
#pragma ASM MOV R7, #10 #pragma ENDASM
But now, there are some reason that i have to write to R7 register direct from C (not from inline ASM), eg:
R7 = 10;
Of course, the C compiler does not understand R7 as MCU Register (not Inline ASM).
-> Is there anyway to solve this problem. Please help me if anyone know, thanks a lot !
"I can see no advantage in what you're trying to do"
Absolutely: no advantage whatsoever; but plenty of clear disadvantages!!
"often it is the simple elegant pieces of code that are written by the smarter people."
Indeed - hence the "Engineer" comment earlier!
;-)