[A83] Re: program slowing


[Prev][Next][Index][Thread]

[A83] Re: program slowing




you could make a lable that caused a short delay.

delay:
   ei   ;interrupts must be enabled for halt
   halt ;waits 1/200th of a second
   ret  ;returns to call

longdelay:
   ld b,100         ;djnz's 100 times
longdelaylp:
   call delay       ;calls delay
   djnz longdelaylp ;dec's 'b', jumps to longdelaylp if b is not 0
   ret

to get a short delay, call delay, do get a long delay call longdelay




Follow-Ups: