|
This post was updated on .
Hello,
I have been stuck on Fill.asm for a while now, so I would appreciate any help on this matter!
To be more specific, I'm struggling to get the screen to fill up black when I press down on a key on my real keyboard.
Behaviour:
When I load my Fill.hack and run it against Fill.tst, I do as the instructions has told and set my View to Screen and select the "No Animation" option. When I hold down to a key, the screen shows one tiny black dot on the corner of the screen as I'm holding down the key, and disappears as soon as a keyup, instead of filling up the screen with all black as expected.
Suspecting that my program logic might be flawed, I select the "Program Flow" option and slow down the speed of execution to observe the actual values being set in the RAM window. The values being set appears to be what I expected:
Observed behaviour of the RAM during keypress: 1. RAM[24576] (@KBD) registers non-zero value
2. ROM jumps to (SETBLACK) line
3. Correct screen register is set to -1 at each loop (RAM[16384] = -1, RAM[16385] = -1, RAM[16386]= -1, etc.). The Screen shows a single black dot throughout, even though the data shows multiple registers in RAM are set to -1.
4. my current index variable @current is incremented by 1 at the end of each loop
Running my program against FillAutomatic.tst shows a "End of Script - Comparison ended successfully" message. When the test script is programmatically setting my keyboard input as 1 (non-zero value), apparently the output is determined to have been set to black, even though I don't see the screen blacken or anything.
Let me know if anyone has ideas on what might be causing this issue. I would also love a second pair of eyes to look over my program if possible!
Cheers.
|