System Software – SIC/XE Program to clear 20 byte string to empty

Problem Statement

Write a sequence of instructions for SIC/XE to clear a 20-byte string to all blanks.

Solution

Line Number(ac)CodeDescription
1LDX ZERO 
2LOOP LDCH BLANK 
3STCH STR1,X 
4TIX TWENTY 
5JLT LOOP 
6STR1 RESW 20 
7BLANK BYTE C ‘ ‘ 
8ZERO WORD 0 
9TWENTY WORD 20