I use KeilC uVision4 for 89C51 MCU. I use "Inline ASM Code", like this :
void main() { #pragma ASM MOV R7, #(80000/40000) #pragma ENDASM }
-> When COMPILE, ASM result file give a wrong value to R7
MOV R7, #0x00
But when i change like this :
void main() { #pragma ASM MOV R7, #(60000/30000) #pragma ENDASM }
-> The COMPILER give correct value to R7
MOV R7, #0x02
=> Seem, there must be a restriction when the ASM Compiler calculate (80000/40000) ? => And is there any way to pass this restriction. Please help me ! Regards !
You don't have to!
"let the Compiler do that"
It will!
"then just add the result of vR3, vR2, vR1 to the Delay() Routines"
You don't need to do any of that, either!
Simply follow the instructions that I just posted...