Z80-Optimized-Routines icon indicating copy to clipboard operation
Z80-Optimized-Routines copied to clipboard

fixed return condition

Open pvmm opened this issue 2 years ago • 2 comments

I tested this code and it seems that the condition is reversed.

pvmm avatar Mar 27 '23 13:03 pvmm

Review by reading the source:

yes, it should be ret nz and the dec hl should be done only when (hl) == 0 to return back to one leading zero char '0'.

ped7g avatar May 12 '25 10:05 ped7g

The ret nz guarantees that it is because it continues past that only if it is.

pvmm avatar May 13 '25 20:05 pvmm