Issue With Using dec to Create a Delay
问题 I've started experimenting with Gameboy programming using Z80 assembly, but I've found something kind of weird. I found a snippet of code used to create a delay: simpleDelay: dec bc ld a,b or c jr nz, simpleDelay ret While playing around with that, I discovered that writing dec bc twice shortens the delay, but writing it 3 times makes the delay longer than using it once or twice. Why does having an even number of dec statements shorten the delay? EDIT: Here's the snippet of code calling the