Please some help/idea on this code from MsxBr-L(tutorial);

Par Wanderley Ferna...

Supporter (5)

Portrait de Wanderley Fernandes Silva

28-02-2017, 00:13

I am learning assembler(z-80), and like some opinion about line 200 of this code, i am thinking he used this because changing/increasing hl register would make some change in flag register, i'd like some opinions about this, and other thing i saw, increasing hl on line 200, it will move all address of instructions(registers C,B,D) to more one address+("somado") (not alligned with the original position), would this cause problems this?
link to code:

!login ou Inscrivez-vous pour poster

Par santiontanon

Paragon (1633)

Portrait de santiontanon

28-02-2017, 16:45

I don't know what that code is supposed to do,but if the E, C, and B registers are to be saved back to their original positions, then, definitively that "INC HL" is a problem (or there is a missing "DEC HL"), right?

Par Sandy Brand

Champion (276)

Portrait de Sandy Brand

28-02-2017, 21:30

But INC HL doesn't modify any flags (only the 8 bit versions of INC and DEC will modify flags), so it can't be that.

Very strange piece of code if you ask me.