Reference no: EM133143813
Multiplication Program in Hack Assembly
Overview
Hack assembly programs (*.asm code) can manipulate registers, RAM, and I/O devices in the Hack Computer. In this task, you will be using Hack assembly to change and store values in registers and RAM, and carry out some arithmetic operations.
Task requirements
a. Go through week 7 class materials on Cloud Deakin & complete the problems in week 7 active learning sessions, so that you get an understanding of how to complete this task.
b. Read the task instructions
Task Instructions
1. Using your knowledge gained from the learning materials and learning sessions in week 7, write a Hack assembly program Mult.asm to multiply two integer values.
2. The inputs of this program are the current values stored in R0 and R1 (i.e., the two top RAM locations).
3. The program must compute the product R0*R1 and store the result in R2. Assume that R0>=0, R1>=0, and R0*R1<32768. Your program need not test these conditions, but rather assume that they hold.
4. Use the provided Mult.tst and Mult.cmp test scripts in task resources to test your implementation via the CPU Emulator tool, as shown in the lecture videos.
5. In a document, explain how you arrived at the solution (1 page max).
6. Upload the code and document to OnTrack
Reference
Nisan, Noam, and Shimon Schocken. The Elements of Computing Systems : Building a Modern Com- puter from First Principles MIT Press, 2005
Floyd, L., Thomas. Digital Fundamentals. Prentice-Hall International, 2003