Mod2 SIC Programming
Mod2 SIC Programming
Faculty: SHIBU V S
Module:2
Topic: SIC and SIC/XE Programming
Assembler Directives
WORD - reserves one word of storage,which is initialized to a value
defined in the operand field of the statement
RESW - reserves one or more words of storage for use by the program.
BYTE - reserves one byte of storage,which is initialized to a value
defined in the operand field of the statement
RESB - reserves one or more characters of storage for use by the
program.
Program No:1- SIC
Data Movement Operations
Program No:1 -SIC/XE
Data Movement Operations
Program No:2- Arithmetic Operations-SIC
Program No:2- Arithmetic Operations-SIC/XE
Program No:3 - Looping and Indexing-SIC
Program No:3- Looping and Indexing-SIC/XE
Program No:4-Sample I/O operations in SIC
Program No:5-Subroutine-SIC
Program No:5-Subroutine-SIC/XE
Exercise-1
Write a sequence of instructions for SIC to set ALPHA equal to the
product of BETA and GAMMA. Assume that ALPHA,BETA and GAMMA
are defined.
Exercise-1 Solution
Exercise-2
Write Sequence of instructions for SIC/XE to set ALPHA equal to
4*BETA-9. Assume that ALPHA and BETA are defined. Use immediate
addressing for the constants.
Exercise-2 Solution
BETA RESW 1
Exercise-3
Write SIC Instructions to SWAP the values of ALPHA and BETA.
Exercise-3 Solution
Exercise-4
Write a sequence of instructions for SIC to set ALPHA equal to the
integer portion of BETA / GAMMA. Assume that ALPHA and BETA are
defined.
Exercise-4 Solution
Program No:4 - Looping and Indexing-SIC
:
:
ZERO WORD 0
LENGTH WORD 1
OUTPUT BYTE X ‘05’
RECORD RESB 100
Exercise-No:10
Suppose that RECORD contains a 100-byte record. Write a subroutine
for SIC/XE that will write this record onto device 05.Use immediate
addressing and register-to-register instructions to make the process as
efficient as possible.
Exercise-No:10-Solution