Problem Statement
Write a sequence of instructions for SIC/XE to clear a 20-byte string to all blanks.
Solution
| Line Number(ac) | Code | Description |
| 1 | LDX ZERO | |
| 2 | LOOP LDCH BLANK | |
| 3 | STCH STR1,X | |
| 4 | TIX TWENTY | |
| 5 | JLT LOOP | |
| 6 | STR1 RESW 20 | |
| 7 | BLANK BYTE C ‘ ‘ | |
| 8 | ZERO WORD 0 | |
| 9 | TWENTY WORD 20 |
Leave a Reply