Hey-
I'm looking at a program disassembly and have seen something funky in a couple of places.
I can tell that this is clearing out a block pointed to by HL for BC count of bytes.
What's the point of the apparently double load statement? D is a single byte being loaded into the location pointed to by HL, right? I don't get the repeated LD statement.
I've seen it in more that one block of code and I'm thinking there may be some quirk that I'm unaware of.
Any help is appreciated.
Kerry
I'm looking at a program disassembly and have seen something funky in a couple of places.
Code:
03EA: AF XOR A,A
03EB: 57 LD D,A
[b]03EC: 72 LD (HL),D
03ED: 72 LD (HL),D[/b]
03EE: 23 INC HL
03EF: 0B DEC BC
03F0: 78 LD A,B
03F1: B1 OR A,C
03F2: 20 F8 JR NZ,$03EC
03F4: C9 RET
I can tell that this is clearing out a block pointed to by HL for BC count of bytes.
What's the point of the apparently double load statement? D is a single byte being loaded into the location pointed to by HL, right? I don't get the repeated LD statement.
I've seen it in more that one block of code and I'm thinking there may be some quirk that I'm unaware of.
Any help is appreciated.
Kerry


