Question: Write hack nand 2 tetris code in . asm for this problem: This program adds together a specified amount of numbers and stores the value

Write hack nand2tetris code in .asm for this problem:
This program adds together a specified amount of numbers and
stores the value in RAM[0]. The amount of numbers, n (<16), is
given in the initial value of RAM[0]; the numbers themselves are
stored starting in RAM[1] and going up in consecutive addresses
up to RAM[n]. You may overwrite the data in the RAM as much
as necessary, as long as the correct value ends up in RAM[0]
when your program is done. Please note that for this problem,
the value of n is less than 16.
// This asm computes the sum of n numbers
// Assuming RAM[0] stores the value n (how many numbers to sum)
// and the numbers are stored in consecutive addresses starting at address 1.
// The result will be stored in RAM[0], overwriting the original value of n.
// It may be useful to use variables when solving this problem.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!