.data
Val1 BYTE 10,20,5 DUP(3) ; i. _______________
Val2 WORD 8 DUP(3 DUP(?)) ; ii. ______________
Val3 WORD 20,30,10 DUP(20) ; iii. _____________
Val4 DWORD 30 DUP(?),0,0 ; iv. ______________
.code
mov cx,SIZEOF Val1 ...
You have a data file that contains a bunch of numbers (.data file)
zoom_data.dat
3 4
15 16
-5 6
11 -12
The program should get this file and change the string into an int. After, the program should calculate the distance of two integers.
For example, output should be
1<NEW LINE>
1<NEW LINE>
11<NEW LINE>
23<NEW LINE>
# file_name_holder: the string that represents the file name
# dat_buff : the buffer that you use to hold data (MAXIMUM: 300 bytes)
check_file:
####################
####################
jr $ra
a)On the IAS, what would the machine code instruction look like to load the contents of memory address 2 to the accumulator?
b) How many trips to memory does the CPU need to make to complete this instruction during the instruction cycle?
1.List some reasons why it is worthwhile to study assembly language programming.
2. Section 15.4 includes a C program that calculates the greatest common divisor of two integers. Describe the algorithm in words and show how the program does implement the Euclid algorithm approach to calculating the greatest common divisor.
draw the binary tree for the expression g / h * (a + b) $ c $( d - f)
Write code to get 2 integers from the user, add them, and print the result
Translate the following high-level code to MIPS
a b c are $s0 - $s2
a = not(b or c)
Translate the following high-level code to MIPS
x, y, z are $s0 $s1 $s2
x = z*z
y = x + 25
z = x + y + z
x = 10
Take rand integer elements to array and display. MIPS.
MIPS. Find the average of an array of integers.