(hope the result of my efforts will be nice surprise for this community!

The problem is simple: how to wait some predefined fraction of second (with minimum space requirement)?
I do not need to do anything in the meantime!

Thank you!
_Stefano
PS: I already tried something similar but seems to fast even repeating it few times:marste wrote:Sorry, forgot to mention in the post: should be machine code (and should consume as minimum amount of byte as possible)!...
Code: Select all
LD BC,100
SET 7,B
LD ($4034),BC ; set timer
loop: LD HL,($4034)
LD A,$7F
AND H
OR L
JR NZ,loop ; wait for zero
Code: Select all
LD BC,number of frames to wait
CALL $0F35
Code: Select all
ld hl,5000h ;delay factor
call DELAYHL
...
DELAYHL:
dec hl
ld a,h
or l
jr nz,DELAYHL
ret
Code: Select all
ld b,n ; your delay counter
loop1 ld hl,frames
ld a,(hl)
loop2 ...... do some code or NOTHING for delay only without B, A or HL (PUSH POP when needed)
cp (hl)
jr z,loop2 ; no alteration in timing
djnz loop1 ; repeat for N* delay 1/50 sec.