hi i am jimmy and my problem is very simple but complicated. how to make a loop subroutine for 1 sec +500 microsec or -500 microsec by just using djnc, mov and nop. it is a 8051 problem so kindly help me.
As pointed out, you need a relationship between real time ( say 500us ) and the system clock period. Another hint is that your problem has two time values in it so you may need to use an instruction twice to generate them. It's a nice exercise in instruction set properties but get familiar with the timers and interrupts for real world applications. :)