ysh443 wrote
Hi
im trying to solve the Fill.asm project
i find it tough
on HACK, every action is made by either A register, D register or both (or by M which gives MEM[A])
on my program, i got to compute the current pixel position and store it into D.
then i check the KYBD and set A to either 0 or 1 depends on KYBD content
and now i want to set MEM[D] with A value,
but
in a frustrating way, any access to MEM uses A
so , how can i set MEM to some value if my only two working registers
already occupied with importend data , that i need imidiatly to use (so storing to some MEM position wont help)
please help
regards
First you need to store the value you computed for screen position in memory so that you can get it later.
Then check the keyboard and get the black or white value into D.
Finally get the saved screen position into A so that you can do M=D to set the screen pixels.
--Mark