*** first : To develop and test the project, use the Mano’s machine emulator. This emulator can be downloaded at [url removed, login to view]
Brief and basic instructions on how to use it can be found at :
[url removed, login to view]
Write assembly language programs to perform each of the following calculations. In your programs, ignore overflow (i.e., assume that your operand values will not produce an overflow)
Add long word: Add two 64-bit unsigned values (e.g., C ← A + B)
Negate long word: Negate a 64-bit value by replacing the value by its two’s complement (e.g., C ← -C)
Subtract long word: Subtract a 64-bit value from another 64-bit value (e.g., C ← A - B)
Multiply long word: Multiply two 32-bit unsigned values to get a 64-bit result (e.g., C ← A * B)
Multiply and accumulate: Multiply two 32-bit unsigned values to get a 64-bit result and add this result to a 64-bit destination value (e.g., C ← C + A * B)
Dot product of two vectors: Find the dot product of two vectors. Each element of these vectors is a 32-bit unsigned value. The result is a 64-bit value. (e.g. let X=[x0,x1,x2,…xn], Y= [y0, y1, y2, …, yn], find Z=X.Y = x0* y0 + x1* y1 + x2* y2 + … + xn * yn). Assume that elements of a vector are stored in consecutive memory locations.
Mano’s machine uses 16-bit words. For storing long values occupying more than one word (i.e., 32-bit and 64-bit values), successive words are used. Use a little-endian strategy to organize these bytes. In a little-endian strategy, the memory address of the value is the address of its least-significant word. For example, to store the 64-bit hexadecimal value FF56EE3799880000 at memory address 12, word 0000 will be stored at address 12, word 9988 is stored at address 13, word EE37 is stored at address 14, and word FF56 is stored at address 15
In all of your programs, store the input values starting at location 1024. Clearly use labels to indicate your input variables. You should follow the format described in this section strictly as input will be supplied to your program using this format for testing.
Your data should be organized as follows (in the given order):
1. Pointers to input and output values
2. [For vectors only, each vector pointer is followed immediately by the size of this vector]
3. Input values
4. Output value
5. Other variables if needed
For example, part (a) the figure below illustrates a part of a program showing locations for 64-bit input values A and B as well as the 64-bit result value C (e.g., for the ADD long operation C ← A + B; you can use similar organization for the SUBTRACT, MULTIPLY and MULTIPLY-ANDACCUMULATE operations). A-PTR, B-PTR, and C-PTR contain the addresses of the values A, B, and C, respectively. A is initialized to have the decimal value of 10 (or hex value 000000000000000A), and B is initialized to have the decimal value of 20 (or hex value 0000000000000014). The result C is initialized to zero
Part (b) the figure attached illustrates a part of a program showing two input vectors X= [11, 12, 13] and Y= [21, 22, 23]. The result of program computations (i.e., dot product) will be stored in scalar value Z.
check attachment to find the image (Examples of input formats )
*** save each program in a separate folder ***