??? 09/23/04 06:17 Read: times |
#77981 - RE: why my ACALL do not work?? Responding to: ???'s previous message |
hi,
If you either pretend to be the processor or use a simulator would will most likely find that your time1 & 2 routines stay in a dead loop. What do you mean with term "dead loop"? They are neither "dead" not "infinite". For example: MOV B,#0 DJNZ B,$just executes the loop 256 times and then quits. When MOV B,#1 DJNZ B,$quits immediately. Indeed, not initialized variables may produce not defined results. But in case of original poster, only the first main() cycle will have not defined speed. After the first iteration, all used for DJNZ locations contain the zeros and next calls have defined speed (each DJNZ will be executed 256 times, two DJNZ = 65536 etc). Regards, Oleg |