Given the instruction set for MARIE in this chapter:
a) Decipher the following MARIE machine language instructions (write the assembly language equivalent):
i) 0010000000000111
ii) 1001000000001011
iii) 0011000000001001
b) Write the following code segment in MARIE’s assembly language:
if X > 1 then
Y := X + X;
X := 0;
endif;
Y := Y + 1;
c) What are the potential problems (perhaps more than one) with the following assembly language code fragment (implementing a subroutine) written to run on MARIE? The subroutine assumes the parameter to be passed is in the AC and should double this value. The Main part of the program includes a sample call to the subroutine. You can assume this fragment is part of a larger program.
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.