SlideShare a Scribd company logo
1 of 14
INTRODUCTION TO ASSEMBLY
LANGUAGE PROGRAMMING
Prof. Bhavana K.
Information Technology Department
International Institute of Information Technology, I²IT
www.isquareit.edu.in
International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Assembly Language Programming (ALP)
Structure of ALP Program
Sections in ALP program are:
 Title
 .model
 Data declaration section
 Code section
International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Assembly Language Programming (ALP)
Structure of ALP Program:
International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Assembly Language Programming (ALP)
Structure of ALP Program
Sections in ALP program are:
 Title – This assembler directive is used to give title
to a program.
 .model – It initializes memory model.
Tiny Code and Data fit into 64K
Small All data fits in one 64K segment, all code fits in one
64K segment.
medium All data fits in one 64K segment, but code may be
greater than 64K.
compact Data may be greater than 64K , code must be less than
64K.
large Both data and code may be greater than 64K
International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Assembly Language Programming (ALP)
Structure of ALP Program
Sections in ALP program are:
 Data declaration section:
International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Sections in ALP program are:
 Data declaration section:
 DB (Define byte) assembler directive is used to
define byte type of variable
 DW (Define word) assembler directive is used to
define word type of variable.
 To define string
 msg db 10,13,”hello$”
 10– ASCII value for new line
 13– ASCII value for carriage return
 $ is used to indicate end of string
 To define an array of 4 bytes
 array db 10,11,12,13
International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Sections in ALP program are:
 Code section
 Initialization of data segment
 MOV AX,@DATA
 MOV DS,AX
 It stores upper four digits of data segment base address in
DS (Data segment ) register.
 The address in DS is used as a segment base address along
with offset address to fetch value from data segment.
International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Sections in ALP program are:
 Interrupts used in assembly language:
 To accept single digit
 MOV AH,01
 INT 21H
 Hex ASCII value of accepted digit gets stored in AL
register.
 To display single digit
 MOV DL,HEX_ASCII_VALUE_OF_DIGIT_TO_DISPLAY
 MOV AH,02
 INT 21H
 To terminate program
 MOV AH,4CH
 INT 21H
International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Sections in ALP program are:
 Interrupts used in assembly language:
 To display string
 LEA DX,VARIABLE_NAME ; Offset address of string to display
 MOV AH,09
 INT 21H
International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Sections in ALP program are:
 Commands to execute program
International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Sections in ALP program are:
 Commands to execute program
 TASM FILENAME.ASM
 The input to assembler is .asm file. It generates two
files .obj and .lst
 TLINK FILENAME.OBJ
 Input to linker is .obj file. It generates two files .map
and .exe
 To execute program give FILENAME.EXE on command
prompt.
International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
Sections in ALP program are:
 To debug ALP program: To check logical errors.
 TD FILENAME.EXE
flags
Stack
segment
Code
segment
Data
segment
registers
International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
References:
1. Peter Abel, Niyaz Nizamuddin, "IBM PC Assembly Language and
Programming", Pearson Education
2. Ray Duncan, "Advanced MS DOS Programming", 2nd edition, BPB
Publications
International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057
Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in
E-mail – bhavanak@isquareit.edu.in
Website - http://www.isquareit.edu.in/

More Related Content

What's hot

What's hot (20)

Basics of Computer Graphics
Basics of Computer GraphicsBasics of Computer Graphics
Basics of Computer Graphics
 
Interrupt Handling with LPC2148
Interrupt Handling with LPC2148Interrupt Handling with LPC2148
Interrupt Handling with LPC2148
 
What are the real differences between a wireframe, storyboard and a prototype?
What are the real differences between a wireframe, storyboard and a prototype?What are the real differences between a wireframe, storyboard and a prototype?
What are the real differences between a wireframe, storyboard and a prototype?
 
Usability Heuristics - Principles & Examples
Usability Heuristics - Principles & ExamplesUsability Heuristics - Principles & Examples
Usability Heuristics - Principles & Examples
 
Programming with LEX & YACC
Programming with LEX & YACCProgramming with LEX & YACC
Programming with LEX & YACC
 
Cloud Computing & Virtual Infrastructure
Cloud Computing & Virtual InfrastructureCloud Computing & Virtual Infrastructure
Cloud Computing & Virtual Infrastructure
 
Adapter Pattern: Introduction & Implementation (with examples)
Adapter Pattern: Introduction & Implementation (with examples)Adapter Pattern: Introduction & Implementation (with examples)
Adapter Pattern: Introduction & Implementation (with examples)
 
Systems Programming & Operating Systems - Overview of LEX-and-YACC
Systems Programming & Operating Systems - Overview of LEX-and-YACCSystems Programming & Operating Systems - Overview of LEX-and-YACC
Systems Programming & Operating Systems - Overview of LEX-and-YACC
 
Strings in Python
Strings in PythonStrings in Python
Strings in Python
 
PIC Microcontroller | ADC Interfacing
PIC Microcontroller | ADC InterfacingPIC Microcontroller | ADC Interfacing
PIC Microcontroller | ADC Interfacing
 
Euler’s Theorem Homogeneous Function Of Two Variables
Euler’s Theorem Homogeneous Function Of  Two VariablesEuler’s Theorem Homogeneous Function Of  Two Variables
Euler’s Theorem Homogeneous Function Of Two Variables
 
Engineering Mathematics | Maxima and Minima
Engineering Mathematics | Maxima and MinimaEngineering Mathematics | Maxima and Minima
Engineering Mathematics | Maxima and Minima
 
Factor Analysis & The Measurement Model
Factor Analysis & The Measurement Model Factor Analysis & The Measurement Model
Factor Analysis & The Measurement Model
 
Introduction to TCP Protocol Suite
Introduction to TCP Protocol SuiteIntroduction to TCP Protocol Suite
Introduction to TCP Protocol Suite
 
FUSION - Pattern Recognition, Classification, Classifier Fusion
FUSION - Pattern Recognition, Classification, Classifier Fusion FUSION - Pattern Recognition, Classification, Classifier Fusion
FUSION - Pattern Recognition, Classification, Classifier Fusion
 
State Pattern: Introduction & Implementation
State Pattern: Introduction  & Implementation State Pattern: Introduction  & Implementation
State Pattern: Introduction & Implementation
 
Differential Equation - Order Degree
Differential Equation - Order DegreeDifferential Equation - Order Degree
Differential Equation - Order Degree
 
Register Organization of 80386
Register Organization of 80386Register Organization of 80386
Register Organization of 80386
 
Introduction to Big Data, HADOOP: HDFS, MapReduce
Introduction to Big Data,  HADOOP: HDFS, MapReduceIntroduction to Big Data,  HADOOP: HDFS, MapReduce
Introduction to Big Data, HADOOP: HDFS, MapReduce
 
Basic Mechanical Engineering | Manufacturing Processes
Basic Mechanical Engineering | Manufacturing ProcessesBasic Mechanical Engineering | Manufacturing Processes
Basic Mechanical Engineering | Manufacturing Processes
 

Similar to Introduction To Assembly Language Programming

SMART LEARNING ASSISTANT
SMART LEARNING ASSISTANTSMART LEARNING ASSISTANT
SMART LEARNING ASSISTANTIRJET Journal
 
SAP-PO_ Daljinder Singh
SAP-PO_ Daljinder Singh SAP-PO_ Daljinder Singh
SAP-PO_ Daljinder Singh Daljinder Singh
 
CURRICULUM VITAE-Nikhil Rathi
CURRICULUM VITAE-Nikhil RathiCURRICULUM VITAE-Nikhil Rathi
CURRICULUM VITAE-Nikhil RathiNikhil Rathi
 
Ankush_Goyal_Resume_2years_Exp
Ankush_Goyal_Resume_2years_ExpAnkush_Goyal_Resume_2years_Exp
Ankush_Goyal_Resume_2years_ExpAnkush Goyal
 
Interactive Voice Response System for College automation
Interactive Voice Response System for College automationInteractive Voice Response System for College automation
Interactive Voice Response System for College automationIRJET Journal
 
Sarathi_AS400
Sarathi_AS400Sarathi_AS400
Sarathi_AS400Sarathi B
 
Suresh_OSI PI Consultant
Suresh_OSI PI ConsultantSuresh_OSI PI Consultant
Suresh_OSI PI ConsultantSuresh Kumar
 
Shajahan Resume
Shajahan ResumeShajahan Resume
Shajahan ResumeShah Jahan
 
Resume- UPASANA DEWAN
Resume- UPASANA DEWANResume- UPASANA DEWAN
Resume- UPASANA DEWANupasana dewan
 

Similar to Introduction To Assembly Language Programming (20)

Supervised Learning in Cybersecurity
Supervised Learning in CybersecuritySupervised Learning in Cybersecurity
Supervised Learning in Cybersecurity
 
Database Query Optimization
Database Query OptimizationDatabase Query Optimization
Database Query Optimization
 
DAA Introduction to Algorithms & Application
DAA Introduction to Algorithms & ApplicationDAA Introduction to Algorithms & Application
DAA Introduction to Algorithms & Application
 
Fundamentals of Computer Networks
Fundamentals of Computer NetworksFundamentals of Computer Networks
Fundamentals of Computer Networks
 
Importance of Theory of Computations
Importance of Theory of ComputationsImportance of Theory of Computations
Importance of Theory of Computations
 
Big Data Technologies
Big Data TechnologiesBig Data Technologies
Big Data Technologies
 
Ranjitha_R_V_Resume
Ranjitha_R_V_ResumeRanjitha_R_V_Resume
Ranjitha_R_V_Resume
 
SMART LEARNING ASSISTANT
SMART LEARNING ASSISTANTSMART LEARNING ASSISTANT
SMART LEARNING ASSISTANT
 
Mukund madhusudan atre_resume
Mukund madhusudan atre_resumeMukund madhusudan atre_resume
Mukund madhusudan atre_resume
 
SAP-PO_ Daljinder Singh
SAP-PO_ Daljinder Singh SAP-PO_ Daljinder Singh
SAP-PO_ Daljinder Singh
 
CURRICULUM VITAE-Nikhil Rathi
CURRICULUM VITAE-Nikhil RathiCURRICULUM VITAE-Nikhil Rathi
CURRICULUM VITAE-Nikhil Rathi
 
Ankush_Goyal_Resume_2years_Exp
Ankush_Goyal_Resume_2years_ExpAnkush_Goyal_Resume_2years_Exp
Ankush_Goyal_Resume_2years_Exp
 
Industrial Training report on java
Industrial  Training report on javaIndustrial  Training report on java
Industrial Training report on java
 
Interactive Voice Response System for College automation
Interactive Voice Response System for College automationInteractive Voice Response System for College automation
Interactive Voice Response System for College automation
 
Sarathi_AS400
Sarathi_AS400Sarathi_AS400
Sarathi_AS400
 
Suresh_OSI PI Consultant
Suresh_OSI PI ConsultantSuresh_OSI PI Consultant
Suresh_OSI PI Consultant
 
What is DevOps?
What is DevOps?What is DevOps?
What is DevOps?
 
Shajahan Resume
Shajahan ResumeShajahan Resume
Shajahan Resume
 
Java as Object Oriented Programming Language
Java as Object Oriented Programming LanguageJava as Object Oriented Programming Language
Java as Object Oriented Programming Language
 
Resume- UPASANA DEWAN
Resume- UPASANA DEWANResume- UPASANA DEWAN
Resume- UPASANA DEWAN
 

More from International Institute of Information Technology (I²IT)

More from International Institute of Information Technology (I²IT) (20)

Minimization of DFA
Minimization of DFAMinimization of DFA
Minimization of DFA
 
Understanding Natural Language Processing
Understanding Natural Language ProcessingUnderstanding Natural Language Processing
Understanding Natural Language Processing
 
What Is Smart Computing?
What Is Smart Computing?What Is Smart Computing?
What Is Smart Computing?
 
Professional Ethics & Etiquette: What Are They & How Do I Get Them?
Professional Ethics & Etiquette: What Are They & How Do I Get Them?Professional Ethics & Etiquette: What Are They & How Do I Get Them?
Professional Ethics & Etiquette: What Are They & How Do I Get Them?
 
Writing Skills: Importance of Writing Skills
Writing Skills: Importance of Writing SkillsWriting Skills: Importance of Writing Skills
Writing Skills: Importance of Writing Skills
 
Professional Communication | Introducing Oneself
Professional Communication | Introducing Oneself Professional Communication | Introducing Oneself
Professional Communication | Introducing Oneself
 
Servlet: A Server-side Technology
Servlet: A Server-side TechnologyServlet: A Server-side Technology
Servlet: A Server-side Technology
 
What Is Jenkins? Features and How It Works
What Is Jenkins? Features and How It WorksWhat Is Jenkins? Features and How It Works
What Is Jenkins? Features and How It Works
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Hypothesis-Testing
Hypothesis-TestingHypothesis-Testing
Hypothesis-Testing
 
Data Science, Big Data, Data Analytics
Data Science, Big Data, Data AnalyticsData Science, Big Data, Data Analytics
Data Science, Big Data, Data Analytics
 
Sentiment Analysis in Machine Learning
Sentiment Analysis in  Machine LearningSentiment Analysis in  Machine Learning
Sentiment Analysis in Machine Learning
 
What Is Cloud Computing?
What Is Cloud Computing?What Is Cloud Computing?
What Is Cloud Computing?
 
Introduction To Design Pattern
Introduction To Design PatternIntroduction To Design Pattern
Introduction To Design Pattern
 
What Is High Performance-Computing?
What Is High Performance-Computing?What Is High Performance-Computing?
What Is High Performance-Computing?
 
Data Visualization - How to connect Microsoft Forms to Power BI
Data Visualization - How to connect Microsoft Forms to Power BIData Visualization - How to connect Microsoft Forms to Power BI
Data Visualization - How to connect Microsoft Forms to Power BI
 
AVL Tree Explained
AVL Tree ExplainedAVL Tree Explained
AVL Tree Explained
 
Yoga To Fight & Win Against COVID-19
Yoga To Fight & Win Against COVID-19Yoga To Fight & Win Against COVID-19
Yoga To Fight & Win Against COVID-19
 
LR(0) PARSER
LR(0) PARSERLR(0) PARSER
LR(0) PARSER
 
Land Pollution - Causes, Effects & Solution
Land Pollution - Causes, Effects & SolutionLand Pollution - Causes, Effects & Solution
Land Pollution - Causes, Effects & Solution
 

Recently uploaded

Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 

Recently uploaded (20)

Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

Introduction To Assembly Language Programming

  • 1. INTRODUCTION TO ASSEMBLY LANGUAGE PROGRAMMING Prof. Bhavana K. Information Technology Department International Institute of Information Technology, I²IT www.isquareit.edu.in
  • 2. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057 Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in Assembly Language Programming (ALP) Structure of ALP Program Sections in ALP program are:  Title  .model  Data declaration section  Code section
  • 3. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057 Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in Assembly Language Programming (ALP) Structure of ALP Program:
  • 4. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057 Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in Assembly Language Programming (ALP) Structure of ALP Program Sections in ALP program are:  Title – This assembler directive is used to give title to a program.  .model – It initializes memory model. Tiny Code and Data fit into 64K Small All data fits in one 64K segment, all code fits in one 64K segment. medium All data fits in one 64K segment, but code may be greater than 64K. compact Data may be greater than 64K , code must be less than 64K. large Both data and code may be greater than 64K
  • 5. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057 Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in Assembly Language Programming (ALP) Structure of ALP Program Sections in ALP program are:  Data declaration section:
  • 6. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057 Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in Sections in ALP program are:  Data declaration section:  DB (Define byte) assembler directive is used to define byte type of variable  DW (Define word) assembler directive is used to define word type of variable.  To define string  msg db 10,13,”hello$”  10– ASCII value for new line  13– ASCII value for carriage return  $ is used to indicate end of string  To define an array of 4 bytes  array db 10,11,12,13
  • 7. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057 Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in Sections in ALP program are:  Code section  Initialization of data segment  MOV AX,@DATA  MOV DS,AX  It stores upper four digits of data segment base address in DS (Data segment ) register.  The address in DS is used as a segment base address along with offset address to fetch value from data segment.
  • 8. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057 Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in Sections in ALP program are:  Interrupts used in assembly language:  To accept single digit  MOV AH,01  INT 21H  Hex ASCII value of accepted digit gets stored in AL register.  To display single digit  MOV DL,HEX_ASCII_VALUE_OF_DIGIT_TO_DISPLAY  MOV AH,02  INT 21H  To terminate program  MOV AH,4CH  INT 21H
  • 9. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057 Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in Sections in ALP program are:  Interrupts used in assembly language:  To display string  LEA DX,VARIABLE_NAME ; Offset address of string to display  MOV AH,09  INT 21H
  • 10. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057 Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in Sections in ALP program are:  Commands to execute program
  • 11. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057 Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in Sections in ALP program are:  Commands to execute program  TASM FILENAME.ASM  The input to assembler is .asm file. It generates two files .obj and .lst  TLINK FILENAME.OBJ  Input to linker is .obj file. It generates two files .map and .exe  To execute program give FILENAME.EXE on command prompt.
  • 12. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057 Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in Sections in ALP program are:  To debug ALP program: To check logical errors.  TD FILENAME.EXE flags Stack segment Code segment Data segment registers
  • 13. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057 Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in References: 1. Peter Abel, Niyaz Nizamuddin, "IBM PC Assembly Language and Programming", Pearson Education 2. Ray Duncan, "Advanced MS DOS Programming", 2nd edition, BPB Publications
  • 14. International Institute of Information Technology, I²IT, P-14, Rajiv Gandhi Infotech Park, Hinjawadi Phase 1, Pune - 411 057 Phone - +91 20 22933441/2/3 | Website - www.isquareit.edu.in | Email - info@isquareit.edu.in E-mail – bhavanak@isquareit.edu.in Website - http://www.isquareit.edu.in/