SIC/XE Program to set 100 elements of the array to 0 using immediate addressing mode
This System Software program demonstrates an SIC/XE program to set all 100 elements of the array to 0 using immediate addressing and register-to-register address mode.
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.
Source Code
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 |