Assume variables A, B, C and D are stored in memory locations 100, 101, 102 and 103, respectively. Using any of the sample machine language instructions given in this section, translate the following pseudocode operations into machine language instruction sequences. Have your instruction sequences begin in memory location 50:
(a) Set A to the value of B x C x D (that is B multiplied by C multiplied by D). You can use a MULTIPLY command for the multiplication.
(b) Set A to the value of B + C + D. You can use an ADD command
Comments
Leave a comment