System Software – SIC/XE Program to set ALPHA equal to 4 * BETA – 9.

Problem Statement

Write a sequence of instructions for SIC/XE to set ALPHA equal to 4 * BETA – 9. Assume that ALPHA and BETA are defined as in Fig 1.3(b). Use immediate addressing for the constants.


Line Number(ac)CodeDescription
1LDA BETALoad the value of BETA in Accumulator
2LDS #4Load the value 4 to Register S
3MULR S,AMultiply the value of Accumulator with Register S and store the result back to Accumulator
4SUB #9Subtract the value 9 from the contents of accumulator
5STA ALPHAStore the value of accumulator to ALPHA
6ALPHA RESW 1Reserve 1 word for ALPHA