System Software – SIC/XE program to clear 20 byte string using Immediate addressing mode.

Problem Statement

Write a sequence of instructions for SIC/XE to clear a 20-byte string to all blanks. Use immediate addressing and register-to-register instructions to make the process as efficient as possible.

Solution

Line Number(ac)CodeDescription
1LDT #20 
2LDX #0 
3LOOP LDCH #0 
4STCH STR1,X 
5TIXR T 
6JLT LOOP 
7STR1 RESW 20