System Software – SIC Program to set ALPHA equal to Product of Beta and Gamma

Problem Statement

Write a sequence of instructions for SIC to set ALPHA equal to the product of BETA and GAMMA. Assume that ALPHA, BETA, and GAMMA are defined as in Fig. 1.3(a).

Solution

Line Number(ac)CodeDescription
1LDA BETALoad the value of BETA in Accumulator
2MUL GAMMAMultiply the value of GAMMA with accumulator and the result will be stored in Accumulator
3STA ALPHAStore the result of Accumulator to ALPHA
4ALPHA RESW 1Reserve 1 word for ALPHA
5BETA RESW 1Reserve 1 word for BETA
6GAMMA RESW 1Reserve 1 word for GAMM