Skip to content
The Computer Science
TheCScience
  • Engineering Subjects
    • Human Values
    • Computer System Architecture
    • Microprocessor
    • Digital Communication
    • Internet of Things
  • NCERT Solutions
    • Class 12
    • Class 11
  • Solutions
    • HackerRank
      • C Solutions
      • C++ Solutions
      • Java Solutions
      • Python Solutions
      • Algorithms Solutions
      • Data Structures Solutions
    • HackerEarth Solutions
    • Leetcode Solutions
  • JEE 2027
The Computer Science
TheCScience

Basic Structure of Assembly Language Program

YASH PAL, March 19, 2026April 25, 2026

Basic Structure of Assembly Language Program – A program is a collection of instructions written in a sequence to perform a specific task.

Table of Contents

  • Basic Structure of Assembly Language Program
    • Sequential Program Structure
    • Iterative Program Structure

Basic Structure of Assembly Language Program

A basic assembly language program can have two types of structure.

  1. Sequential Program Structure
  2. Iterative Program Structure

Sequential Program Structure

The instructions of a sequential program are executed one after another without any change in the sequence. Meaning that there is no branch instruction in the program. The program counter register is continuously incrementing until the instruction HLT is executed.

Let’s write a sequential assembly language program to perform the following operations:

  1. Load the number 53H in register B and 58H in register C.
  2. Add the contents of register B and register C.
  3. Save the sum at memory location XX70H.

Solution: A flowchart of the given problem is shown in Figure 1.

Flowchart for a sequential program
Figure 1: Flowchart for a sequential program
Memory
Address
Hex
Code
Instruction
Opcode
Instruction
Operand
Comments
XX00H
XX01H
06
53
MMB, 53HLoad 53H to register B
XX02H
XX03H
0E
58
MMC, 58HLoad 58H to register C
XX04H78MOVA, BCopy the contents of register B to A
XX05H81ADDCAdd the contents of register C to A
XX06H
XX07H
XX08H
32
70
XX
STAXX70HStore the result stored in register A to memory location XX70H
XX09H76HLTStop the execution
Assembly Language Program

Since there is no repeated task or instruction, this is an example of a sequential program.

Iterative Program Structure

The program in which a segment of the program is repeated to complete a task or to solve a typical problem is known as an iterative program. An iterative program structure can be further classified into two groups:

  1. Unconditional
  2. Conditional

Unconditional Iterative Program – In this type of program, the segment is repeated without any condition.

Conditional Iterative Program – In conditional iterative programs, the segment of the program is repeated after checking the condition. If the condition is satisfied, the repetition is done else not.

Let’s write an assembly language program to continuously read the status of eight switches connected at the input port. Input port address is 01H. Stop the execution of the program if all the input switches are OFF(0).

Solution: Reading operation, in this problem, is a task to be repeated until all the input switches are OFF(0). It means this is an example of a conditional iterative program. The flow chart for this is shown in Figure 2.

Flowchart for a lterative program
Figure 2: Flowchart for an iterative program
Memory
Address
Hex
Code
LabelInstruction
Opcode
Instruction
Operand
Comments
XX00HDBSRTIN01HRead the input port with the address 01H.
XX01H01IN01HRead the input port with the address 01H.
XX02HFECPI00HCompare the input data from input port with the immediate data 00H.
XX03H00CPI00HCompare the input data from the input port with the immediate data 00H.
XX04HC2JNZSRTIf the zero flag Z = 0, jump to the label SRT; else execute the next instruction.
XX05H00JNZSRTIf the zero flag Z = 0, jump to the label SRT; else execute the next instruction.
XX06HXXJNZSRTIf the zero flag Z = 0, jump to the label SRT else execute the next instruction.
XX07H76HLTStop the execution.
Assembly Language Program

Microprocessor Subject Tutorials & Notes | Beginners Guide
engineering subjects Microprocessor microprocessor

Post navigation

Previous post
Next post

Introduction to Microprocessor
Generations of Computer
Microprocessor Types
Types of Computer Systems
Types of Programming Languages
Basic Computer Structure
Interfacing Logic Devices
Number System in Computer
Number System Arithmetic – Addition & Subtraction

Microprocessor as CPU
8085 Microprocessor Architecture
Pin Configuration of 8085 Microprocessor
Demultiplexing of Address and Data Bus in 8085 Microprocessor
Basic Operations of the 8085 Microprocessor
Memory Organization in 8085 Microprocessor

Microprocessor memory structure
Memory Interfacing with 8085 Microprocessor
Memory address decoding in a microprocessor
Input/Output Interfacing in Microprocessor

8085 Microprocessor Programming Model
8085 Assembly Language Programming
8085 Microprocessor Instructions
Microprocessor Programming Steps
Flowchart Design of a Program
8085 Microprocessor Data Transfer Instructions
8085 Microprocessor Arithmetic Instructions
8085 Microprocessor Logical Instructions
8085 Microprocessor Branch Instructions
8085 Microprocessor Machine-Processor Control Instructions
Basic Structure of an Assembly Language Program
Programming Techniques for Repeated Tasks
Debugging of a Microprocessor Program

8085 Microprocessor Timing Operations
Timing Diagram of 8085 Microprocessor
Time Delay in Microprocessor
Stack in 8085 Microprocessor
Subroutine in 8085 Microprocessor
MACRO in Microprocessor

Interrupts in 8085 Microprocessor
Digital to Analog Converter (DAC) in Microprocessor
Analog to Digital Converter (ADC) in Microprocessor

Programmable Peripheral Interface
8255 (PPI) Programmable Peripheral Interface
Programmable Interval Timer (PIT) 8253/8254
Programmable Interrupt Controller (PIC) 8259
Direct Memory Access (DMA) Controller 8257

8086 Microprocessor Architecture, Instructions, and Pin Diagram
Addressing Modes of the 8086 Microprocessor
Instruction Set of 8086 Microprocessor
8088 Microprocessor Architecture with Pin Diagram
Difference between 8085, 8086, and 8088 Microprocessors
80186 Microprocessor Architecture
80286 Microprocessor Architecture & Features
80386 Microprocessor Architecture & Features
80486 Microprocessor Architecture & Features
80586 (Pentium) Microprocessor Architecture & Features

8051 Microcontroller Architecture
8051 Microcontroller Memory Organization
8051 Microcontroller Pin Configuration & Programming Model
8051 Microcontroller Timers and Counters
Serial Communication in 8051 Microcontroller
Interrupts of the 8051 Microcontroller
Addressing Modes of the 8051 Microcontroller
Intel MMX Architecture
Dual Core Processor

LED & Multiplexed Display Interfacing with Microprocessor
Liquid Crystal Display (LCD) Pin Configuration & Interfacing
Matrix Keyboard Interfacing with Microprocessor
8279 Keyboard/Display Controller
Programmable Communication Interface (USART) 8251
Serial Communication Standards in Microprocessor
Computer System Standard Buses

TheCScience

At TheCScience.com, our mission is to make quality education accessible to everyone. We provide in-depth, easy-to-understand articles covering Secondary, Senior Secondary, and Graduation-level subjects.

Our content is designed to simplify complex concepts through clear explanations, diagrams, and structured learning—helping students build strong fundamentals and succeed academically without financial barriers.

Pages

About US

Contact US

Privacy Policy

DMCA

Our Tools

Hosting - get 20% off

Engineering Subjects

Internet of Things

Human Values

Digital Communication

Computer System Architecture

Microprocessor

Programming Tutorials

Data Structure and Algorithm

C

Java

NCERT

Class 12th

©2026 TheCScience | WordPress Theme by SuperbThemes