Character Array x initialed to a b c d e f g h i j k l mPoin

Character Array x initialed to (a, b, c, d, e, f, g, h, i, j, k, l, m);Pointer Xptr refers to the first element of X array and has a value 124FFBC. Each element is represented by 16 bit uni-code Memory is byte organized. What are the address locations of elements: c. f. and m in the above? Specify m in the above? Specify in the hex decimal notation and the SML system, the first two digits refer to the Op code and the last two digits to the operand memory location, (from page 327/328) The Op codes are: READ 10, WRITE 11, LOAD 20; STORE 21; ADD 30; SUBTRACT 31; CXV1DE 32; Multiply 33; BRANCH 40: BRANCHNEG 41; BRANCHZERO 42; HALT 43; in the following machine language program, starting at memory DD a) What are the nitial contents of locations 08, 09, 10, and 11 before the program is run Contents of locations 07 08 09 10 11 b) In the above, does the program terminate or loop back at the Halt instruction? C) After the program is run starting from location 00, A and B values are 44 and 77. What are stored in locations 07, 08, 09, 10, and 11. Contents of locations 07 08 09 10 11 d)If contents of location 03 are changed from 3108 to 3008 repeat part (b) above with A- 77 and 8 = 44. Contents of locations 07 08 09 10 11 e) Functional memory initialisation C program for the above SMI system is as shown. for (k=20; k

Solution

Solution:

g) As we know that in an array the elements are stored at consecutive memory locations. In the question, the Xptr contains the address of the first element i.e. 124FFBC, which means it is the address of a. Now to find out the hex value of elements asked above:

c= 124FFBE

f= 124FFC1

m=124FFC8

( the address is calculated by increasing the memory address of a by 1 for each element given in the array)

 Character Array x initialed to (a, b, c, d, e, f, g, h, i, j, k, l, m);Pointer Xptr refers to the first element of X array and has a value 124FFBC. Each elemen

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site