Re: Machine code challenge
Posted: Wed Nov 22, 2017 7:06 pm
Err, you might be looking too much into it. There's basically two loops, the outer one makes the edges, the inner one fills the horizontal lines if the Z flag is set. Before entering the overall loop, we set the Z flag using CP A so the first line is filled horizontally. Next time this happens is at the last line, where Z is set by DEC E when E reaches 0. In between these two it's just putting the edges, and the inner loop does nothing apart from INC HL x 30.
Scratch that, now I have no idea what's going on in there myself. Well done!Ast A. Moore wrote: ↑Wed Nov 22, 2017 6:17 pmI commented his code. Hope I didn’t make it sound more complicated than it actually is
Not bad. I knew something was off about that JP P: RET construction.