Tag: Assembly Language

System Software – SIC/XE Program to Write a subroutine to read a record into a buffer

Problem Statement Write a subroutine for SIC/XE that will read a record into a buffer. The record may be any length from 1 to 100 bytes. The end of record is marked with a “null” character (ASCII code 00). The subroutine should place the length of the record read into a variable named LENGTH. Use immediate addressing and register-to-register instructions to make the process as…

System Software – SIC/XE Program to write a subroutine for SIC that will read a record into a buffer

Problem Statement Write a subroutine for SIC that will read a record into a buffer. The record may be any length from 1 to 100 bytes. The end of record is marked with a “null” character (ASCII code 00). The subroutine should place the length of the record read into a variable named LENGTH. Solution Line Number Code Comments 1 RDREC LDX ZERO   2…

System Software – SIC/XE Program to multiply two arrays

Problem Statement 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. Solution Line Number Code Comments 1 LDS #3   2 LDT #300   3 LDX #0   4 ADDLOOP LDA ALPHA, X   5 MUL #4   6 ADD BETA,…

System Software – SIC/XE Program to set 100 elements of the array to 0 using immediate addressing mode

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…

Liked this content?. Please spread the word :)