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) | Code | Description |
| 1 | LDT #20 | |
| 2 | LDX #0 | |
| 3 | LOOP LDCH #0 | |
| 4 | STCH STR1,X | |
| 5 | TIXR T | |
| 6 | JLT LOOP | |
| 7 | STR1 RESW 20 |
Leave a Reply