You are correct, you need to come up with a loop that writes -1 or 0 to all the screen locations.
In pseudo-code, ignoring the key up/down changing what gets written, the loop needs to look like
addr = 16384
while (addr < 24576) {
RAM[addr] = -1
addr = addr + 1
}
The A register in the Hack computer is a very busy register since it must be used for all memory accesses and to load all constants. It is not possible to keep
addr in A and do the loop end address comparison. A also needs to be used when you add the keyboard check to the loop.
addr needs to be a variable in memory. It is accessed just like R0, R1 and R2 were in Mult.asm. (The R
n registers are really just memory variables with fixed addresses.)
Ask if you need more help.
--Mark