Problem Statement
Assume that ALPHA is an array of 100 words. Write a sequence of instructions for SIC/XE to set all 100 elements of the array to 0. Use immediate addressing and register-to-register instructions to make the process as efficient as possible.
Solution
Line Number | Code | Comments |
1 | LDS #3 | |
2 | LDT #300 | |
3 | LDX #0 | |
4 | LOOP LDA #0 | |
5 | STA ALPHA, X | |
6 | ADDR S, X | |
7 | COMPR X, T | |
8 | JLT LOOP | |
9 | ALPHA RESW 100 |
Leave a Reply