System Software – SIC/XE Program to divide BETA by GAMMA and set ALHPA to floating quotient

Problem Statement

Write a sequence of instructions for SIC/XE to divide BETA by GAMMA, setting ALPHA to the value of the quotient, rounded to the nearest integer. Use register-to-register instructions to make the calculation as efficient as possible.

Solution

Line Number(ac)CodeDescription
1LDF BETA 
2DIVF GAMMA 
3FIX 
4STA ALPHA 
5ALPHA RESW 1 
6BETA RESW 1 
7GAMMA RESW 1