CodersEditor Tutorials

CodersEditor Tutorials

  • Online IDE
  • Q&A
  • C Programming
  • Java
  • GraphQL.NET
  • System Software

›SIC & SIC/XE Programs

System Software

    SIC & SIC/XE Programs

    • SIC Program to set ALPHA equal to Product of Beta and Gamma
    • SIC/XE Program to set ALPHA equal to 4 * BETA – 9
    • SIC/XE Program to swap the ALPHA and BETA
    • SIC Program to set ALPHA equal to the integer portion of BETA / GAMMA
    • SIC/XE Program to divide BETA by GAMMA, setting ALPHA to the integer portion of the quotient and DELTA to the remainder
    • SIC/XE Program to divide BETA by GAMMA, setting ALPHA to the value of the quotient
    • SIC/XE program to clear 20 byte string using Immediate addressing mode
    • SIC program to set 100 elements of array to Zero
    • SIC/XE Program to clear 20 byte string to empty
    • SIC/XE Program to set ALPHA=GAMMA*BETA-9 using register operation
    • SIC/XE Program to set 100 elements of the array to 0 using immediate addressing mode
    • SIC/XE Program to arrange an array of 100 words in ascending order
    • SIC/XE Program to multiply two arrays
    • SIC/XE Program to find the maximum element in the array and store result in MAX
    • SIC/XE Program to write a subroutine for SIC that writes record on to device 05
    • SIC/XE Program to write a subroutine for SIC that will read a record into a buffer
    • SIC/XE Program to Write a subroutine to read a record into a buffer
    • SIC/XE program to copy a character string to another string

SIC Program to swap the values of ALPHA and BETA

This System Software program shows how you can write a sequence of instructions in SIC to swap the values of the variables ALPHA and BETA.

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

Sourcecode

Line NumberCodeDescription
1LDA ALPHALoad the value of ALPHA in Accumulator
2STA GAMMAStore the value of Accumulator to GAMMA
3LDA BETALoad the value of BETA to Accumulator
4STA ALPHAStore the value of Accumulator to ALPHA
5LDA GAMMALoad the value of GAMMA to Accumulator
6STA BETAStore the value of Accumulator to BETA
7ALPHA RESW 1Reserve 1 word for ALPHA
8BETA RESW 1Reserve 1 word for BETA
9GAMMA RESW 1Reserve 1 word for GAMMA
← SIC/XE Program to set ALPHA equal to 4 * BETA – 9SIC Program to set ALPHA equal to the integer portion of BETA / GAMMA →
CodersEditor Tutorials
CoderdEditor Developer Tools
CodersEditor Online EditorGit Flavoured Markup EditorFree Online JSON FormatterFind My IP Address Details
Tutorials
C ProgrammingJava
Copyright © 2021 CodersEditor.com