This System Software program demonstrates a set of instructions in SIC/CE to multiple two arrays and stored in the result GAMMA.
Assume that ALPHA and BETA are the two arrays of 100 words. Another array of GAMMA elements are obtained by multiplying the corresponding ALPHA element by 4 and adding the corresponding BETA elements.
Line Number | Code | Comments |
---|---|---|
1 | LDS #3 | |
2 | LDT #300 | |
3 | LDX #0 | |
4 | ADDLOOP LDA ALPHA, X | |
5 | MUL #4 | |
6 | ADD BETA, X | |
7 | STA GAMMA, X | |
8 | ADDR S, X | |
9 | COMPR X, T | |
10 | JLT ADDLOOP | |
11 | ALPHA RESW 100 | |
12 | BETA RESW 100 | |
13 | GAMMA RESW 100 |