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

By Wanderley Ferna...

Supporter (5)

Wanderley Fernandes Silva's picture

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:
http://pastebin.com/9yrYmP3G

Login or register to post comments

By santiontanon

Paragon (1072)

santiontanon's picture

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?

By Sandy Brand

Master (190)

Sandy Brand's picture

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.