Skip to content

itsnotizzy/Procedural-and-Loop-Instructions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Procedural and Loop Instructions

Objectives:

 Write a simple program that uses a procedural call.
 Demonstrate jump instructions via flag conditions and compare instructions.


Construct a simple assembly language program that would satisfy the following conditions:

  • The program should accept a single-digit input, from 0 to 9.
  • Compare the single-digit input to 5.
  • Prompt the user whether the input is below, equal, or above the value 5.
  • Utilize compare and jump instructions.
  • The program should contain at least one (1) procedure that is called and executed.
  • Add comments in the important sections/code segments of your program.

This program is divided into three sections: data, text, and bss. The data section stores messages displayed to the user. The text section contains the program instructions. It starts by prompting the user for input, then reads it. It compares the input to 5 and jumps to different sections (below_input, equal_input, and above_input) based on the result. Each section displays a corresponding message, then the program exits. The bss section reserves memory for the user input.


🖥️ Pre-final Task Performance for my 3rd-year college course "Computer Organization."

SY2324-2T

💙 Instagram: @izzyluuuuh