I have programmed in assembly before so I understnad low level languages, but I dont understand what im supposed to do for Mult.asm, im just not sure what hte assignment is for that. And for Fill.asm im not sure:
1. how to check for input from the keyboard
2. how to change the entire screen, not just one pixel, to black from white
3. how to change it from black to white once input has stopped from the keyboard.
I do know how to make an infinite loop, but doesnt that usually cause a compiler error?
Mult.asm implements multiplication in software (Hack Assembly language). Given a number in one register, and another number in a second register, place their product in a third register.
Review the book chapter for how to read the keyboard - it's one register in Memory. Which register?
If you know how to change one pixel, do you know how to change, say, 16 pixels?
#3) That's part of the challenge you'll have to think about some more. Write it in pseudocode first. Solve the problem, then write the solution as asm.
An infinite loop is not a compilation error - sometimes we want an infinite loop in our program. When we don't want an infinite loop, but we end up with one in a program, it is, at most, a logic error.
I want to make sure I understand this correctly. D represents the address of the register and m represents the value? so for changing the color of the screen, 1 pixel at a time would be
Im afraid I still don't understand the hack assembly language. I don't understand how to do NON infinite loop for MULT. All I understand is that when you use the @ symbol, that is what A is set to. I also dont understand what D and M are used for, they look like they are used for the same things.
My instructors lecture las night cleared alot of things up for me. I do wonder, after I change the color of 16 pixels at a time, how do I move to the next 16? say I store the address of the begining of the screen at R0.
D=M+1 move me just one pixel, or all 16? If it moves just one, would: