System Software – SIC program to set 100 elements of array to Zero

Published on June 27, 2016 by admin

Filed under Assembly Language

Last modified June 27, 2016

Print this page

rate 1 star rate 2 star rate 3 star rate 4 star rate 5 star
Your rating: none, Average: 3.3 (6 votes)

This article have been viewed 22613 times

Problem Statement

Suppose that ALPHA is an array of 100 words, as defined in Fig. 1.5(a). Write a sequence of instructions for SIC to set all 100 elements of the array to 0.

Solution

Line Number(ac) Code Description
1 LDA ZERO  
2 STA INDEX  
3 LOOP LDX INDEX  
4 LDA ZERO  
5 STA ALPHA, X  
6 LDA INDEX  
7 ADD THREE  
8 STA INDEX  
9 COMP K300  
10 TIX TWENTY  
11 JLT LOOP  
12 INDEX RESW 1  
13 ALPHA RESW 100  
14 ZERO WORD 0  
15 K300 WORD 100  
16 THREE WORD 3  

Leave a Comment


x

You might be Interested in these Posts

System Software - SIC Program to swap the values of ALPHA and BETA

Problem Statement Write a sequence of instructions for SIC to swap the values of ALPHA and BETA. S...

System Software - SIC/XE Program to set ALPHA equal to 4 * BETA - 9.

Problem Statement Write a sequence of instructions for SIC/XE to set ALPHA equal to 4 * BETA - 9. A...

System Software - SIC Program to set ALPHA equal to Product of Beta and Gamma

Problem Statement Write a sequence of instructions for SIC to set ALPHA equal to the product of BET...