void delay_1ms(void) { uint i=880;//already validated by oscillograph do { }while(--i); /* call 7 clock push HL 4 clock movw HL,880 6 clock Delay1:DECW HL 4 clock movw AX,HL 6 clock OR A,X 4 clock BNZ $_Delay1 6 clock POP HL 4 clock RET 6 clock */ //about 7+4+6+4+880*(4+6+4+6)=17618 clock=17618/16 us=1.101ms } |