AFAIK, decrement of a 0 value should set the h flag on the Gameboy, but I don't see that happen in uCsim:
Stop at 0x000385: (109) stepped 4 ticks
ZNHC---- Flags= 0x80 128 . A= 0x00 0 .
10000000
BC= 0x0500 [BC]= 2a 42 * DE= 0x052f [DE]= 00 0 . HL= 0xc006 [HL]= 01 1 .
SP= 0xdffc [SP]= bd 189 .
0x0385 ? 3d DEC A
F 0x000385
0>
Stop at 0x000386: (109) stepped 4 ticks
ZNHC---- Flags= 0x40 64 @ A= 0xff 255 .
01000000
BC= 0x0500 [BC]= 2a 42 * DE= 0x052f [DE]= 00 0 . HL= 0xc006 [HL]= 01 1 .
SP= 0xdffc [SP]= bd 189 .
0x0386 ? f5 PUSH AF
F 0x000386
0>
[r16254]
Related
Commit: [r16254]