; ------------------------------------------------------------- ; Variablen ; ------------------------------------------------------------- DelayCounter0 DATA 0h DelayCounter1 DATA 1h DelayCounter2 DATA 2h ORG 0h JMP Main Main: CPL P1.0 LCALL delay0 JMP Main ; Diese Prozedur implementiert eine Warteschleife von 50 ms. Delay0: PUSH PSW PUSH DelayCounter0 PUSH DelayCounter1 MOV DelayCounter1, #86H ____1_Delay0: MOV DelayCounter0, #29H ____2_Delay0: NOP NOP NOP NOP NOP NOP NOP DJNZ DelayCounter0, ____2_Delay0 DJNZ DelayCounter1, ____1_Delay0 POP DelayCounter1 POP DelayCounter0 POP PSW RET