SlideShare a Scribd company logo
1 of 29
Assembly Language Fundamentals of Assembly language Motaz K. Saad Spring 2007 Motaz K. Saad, Dept. of CS
Instruction Execution and Addressing ,[object Object],[object Object],Motaz K. Saad, Dept. of CS
26AE CS 0044 IP Instruction address = ??????? Motaz K. Saad, Dept. of CS
26AE CS 0044 IP Instruction address = 26AE0 +  0044 _______________________   26B24  25BD DS A03F00 26B24 Data address=?????? Motaz K. Saad, Dept. of CS
26AE CS 0044 IP Data  address = 25BD0   +  003F _______________________   25C0F   25BD DS Motaz K. Saad, Dept. of CS
Review old concepts ,[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
Example program ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
; <your comments> ; Add two numbers and store the results into the third variable TITLE A04ASM1 (EXE)  Move and add operations ; --------------------------------------------- .STACK ; ---------------------------------------------- .DATA FLDD DW   215 FLDE DW   125 FLDF DW   ? ; ----------------------------------------------- .CODE MAIN PROC  MOV  AX,@DATA ;Set address of data  MOV  DS,AX ;  segment in DS  MOV  AX,FLDD ;Move 0215 to AX ADD AX,FLDE ;Add  0125 to AX MOV FLDF,AX ;Store sum in FLDF MOV  AX,4C00H ;End processing INT 21H MAIN ENDP ;End of procedure END   MAIN ;End of program Comments COMMENTS Motaz K. Saad, Dept. of CS
; Add two numbers and store the results into the third variable TITLE A04ASM1 (EXE)  Move and add operations ; --------------------------------------------- .STACK ; ---------------------------------------------- .DATA FLDD DW   0215H FLDE DW   0125H FLDF DW   ? ; ----------------------------------------------- .CODE MAIN PROC MOV  @DATA ;Set address of data  MOV  DS,AX ;Segment in DS  MOV   AX,FLDD ;Move 0215 to AX ADD   AX,FLDE ;Add  0125 to AX MOV   FLDF,AX ;Store sum in FLDF MOV   AX,4C00H ;End processing INT   21H MAIN ENDP ;End of procedure END   MAIN ;End of program IDENTIFIERS Motaz K. Saad, Dept. of CS
Identifiers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
Practice ,[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
[object Object],[object Object],[object Object],[object Object],[object Object],RESERVED WORDS Motaz K. Saad, Dept. of CS
STATEMENT ,[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
; Add two numbers and store the results into the third variable page  60,132 TITLE A04ASM1 (EXE)  Move and add operations ; --------------------------------------------- .STACK ; ---------------------------------------------- .DATA FLDD DW   215 FLDE DW   125 FLDF DW   ? ; ----------------------------------------------- .CODE MAIN PROC MOV  AX,@DATA ;Set address of data  MOV  DS,AX ;Segment in DS  MOV   AX,FLDD ;Move 0215 to AX ADD   AX,FLDE ;Add  0125 to AX MOV   FLDF,AX ;Store sum in FLDF MOV   AX,4C00H ;End processing INT   21H MAIN ENDP ;End of procedure END   MAIN ;End of program STATEMENTS Motaz K. Saad, Dept. of CS
Directives ,[object Object],[object Object],Motaz K. Saad, Dept. of CS
; Add two numbers and store the results into the third variable page  60,132 page [length(10-255)],[width(60-132)] TITLE A04ASM1 (EXE)  Move and add operations ; --------------------------------------------- .STACK ; ---------------------------------------------- .DATA FLDD DW   215 FLDE DW   125 FLDF DW   ? ; ----------------------------------------------- .CODE MAIN PROC MOV  AX,@DATA ;Set address of data  MOV  DS,AX ;Segment in DS  MOV   AX,FLDD ;Move 0215 to AX ADD   AX,FLDE ;Add  0125 to AX MOV   FLDF,AX ;Store sum in FLDF MOV   AX,4C00H ;End processing INT   21H MAIN ENDP ;End of procedure END   MAIN ;End of program Page directive Motaz K. Saad, Dept. of CS
; Add two numbers and store the results into the third variable page  10,70 TITLE A04ASM1 (EXE)  Move and add operations ; --------------------------------------------- .STACK ; ---------------------------------------------- .DATA FLDD DW   215 FLDE DW   125 FLDF DW   ? ; ----------------------------------------------- .CODE MAIN PROC MOV  AX,@DATA ;Set address of data  MOV  DS,AX ;Segment in DS  MOV   AX,FLDD ;Move 0215 to AX ADD   AX,FLDE ;Add  0125 to AX MOV   FLDF,AX ;Store sum in FLDF MOV   AX,4C00H ;End processing INT   21H MAIN ENDP ;End of procedure END   MAIN ;End of program Page directive Motaz K. Saad, Dept. of CS
Title directive Motaz K. Saad, Dept. of CS ; Add two numbers and store the results into the third variable page  10,70 TITLE A04ASM1 (EXE)  Move and add operations ; --------------------------------------------- .STACK ; ---------------------------------------------- .DATA FLDD DW   215 FLDE DW   125 FLDF DW   ? ; ----------------------------------------------- .CODE MAIN PROC MOV  AX,@DATA ;Set address of data  MOV  DS,AX ;Segment in DS  MOV   AX,FLDD ;Move 0215 to AX ADD   AX,FLDE ;Add  0125 to AX MOV   FLDF,AX ;Store sum in FLDF MOV   AX,4C00H ;End processing INT   21H MAIN ENDP ;End of procedure END   MAIN ;End of program
; Add two numbers and store the results into the third variable page  60,132 TITLE A04ASM1 (EXE)  Move and add operations ; --------------------------------------------- .STACK ; ---------------------------------------------- .DATA FLDD DW   215 FLDE DW   125 FLDF DW   ? ; ----------------------------------------------- .CODE MAIN PROC MOV  AX,@DATA ;Set address of data  MOV   FLDF,AX ;Store sum in FLDF MOV   AX,4C00H ;End processing INT   21H MAIN ENDP ;End of procedure END   MAIN ;End of program Segment directive Motaz K. Saad, Dept. of CS
; Add two numbers and store the results into the third variable page  60,132 TITLE A04ASM1 (EXE)  Move and add operations ; --------------------------------------------- .STACK ; ---------------------------------------------- .DATA FLDD DW   215 FLDE DW   125 FLDF DW   ? ; ----------------------------------------------- .CODE MAIN PROC MOV  AX,@DATA ;Set address of data  MOV  DS,AX ;Segment in DS  MOV   AX,FLDD ;Move 0215 to AX MOV   FLDF,AX ;Store sum in FLDF MOV   AX,4C00H ;End processing INT   21H MAIN ENDP ; End of procedure END   MAIN ;End of program PROC directive Motaz K. Saad, Dept. of CS
PROC directive ,[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
Simplified Segment Directives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
Simplified Segment Directives ,[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
Data type ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
Data type ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
Directives for defining Data ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
Some instructions on arithmetic calculation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
Some instructions on arithmetic calculation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
Practice ,[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS

More Related Content

What's hot

Binary and hex input/output (in 8086 assembuly langyage)
Binary and hex input/output (in 8086 assembuly langyage)Binary and hex input/output (in 8086 assembuly langyage)
Binary and hex input/output (in 8086 assembuly langyage)Bilal Amjad
 
Organization of the ibm personal computers
Organization of the ibm personal computersOrganization of the ibm personal computers
Organization of the ibm personal computerswarda aziz
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...Bilal Amjad
 
Flag Registers (Assembly Language)
Flag Registers (Assembly Language)Flag Registers (Assembly Language)
Flag Registers (Assembly Language)Anwar Hasan Shuvo
 
8086 in minimum mode
8086 in minimum mode8086 in minimum mode
8086 in minimum modeSridari Iyer
 
assembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YUassembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YUEducation
 
Assembly Langauge Chap 1
Assembly Langauge Chap 1Assembly Langauge Chap 1
Assembly Langauge Chap 1warda aziz
 
Instruction Set of 8086 Microprocessor
Instruction Set of 8086 MicroprocessorInstruction Set of 8086 Microprocessor
Instruction Set of 8086 MicroprocessorAshita Agrawal
 
8086 instruction set (with simulator)
8086 instruction set (with simulator)8086 instruction set (with simulator)
8086 instruction set (with simulator)Aswini Dharmaraj
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086saurav kumar
 
Decoder for digital electronics
Decoder for digital electronicsDecoder for digital electronics
Decoder for digital electronicsIIT, KANPUR INDIA
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...Bilal Amjad
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Bilal Amjad
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086Mahalakshmiv11
 
Microprocessor 8086 instruction description
Microprocessor 8086 instruction descriptionMicroprocessor 8086 instruction description
Microprocessor 8086 instruction descriptionDheeraj Suri
 
Intel x86 Architecture
Intel x86 ArchitectureIntel x86 Architecture
Intel x86 ArchitectureChangWoo Min
 

What's hot (20)

Binary and hex input/output (in 8086 assembuly langyage)
Binary and hex input/output (in 8086 assembuly langyage)Binary and hex input/output (in 8086 assembuly langyage)
Binary and hex input/output (in 8086 assembuly langyage)
 
Organization of the ibm personal computers
Organization of the ibm personal computersOrganization of the ibm personal computers
Organization of the ibm personal computers
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
 
Flag Registers (Assembly Language)
Flag Registers (Assembly Language)Flag Registers (Assembly Language)
Flag Registers (Assembly Language)
 
8086 in minimum mode
8086 in minimum mode8086 in minimum mode
8086 in minimum mode
 
8086 Instruction set
8086 Instruction set8086 Instruction set
8086 Instruction set
 
assembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YUassembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YU
 
Assembly Langauge Chap 1
Assembly Langauge Chap 1Assembly Langauge Chap 1
Assembly Langauge Chap 1
 
Instruction Set of 8086 Microprocessor
Instruction Set of 8086 MicroprocessorInstruction Set of 8086 Microprocessor
Instruction Set of 8086 Microprocessor
 
8086 instruction set (with simulator)
8086 instruction set (with simulator)8086 instruction set (with simulator)
8086 instruction set (with simulator)
 
8086 instruction set
8086  instruction set8086  instruction set
8086 instruction set
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
Assembly 8086
Assembly 8086Assembly 8086
Assembly 8086
 
8086 assembly
8086 assembly8086 assembly
8086 assembly
 
Decoder for digital electronics
Decoder for digital electronicsDecoder for digital electronics
Decoder for digital electronics
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
 
Microprocessor 8086 instruction description
Microprocessor 8086 instruction descriptionMicroprocessor 8086 instruction description
Microprocessor 8086 instruction description
 
Intel x86 Architecture
Intel x86 ArchitectureIntel x86 Architecture
Intel x86 Architecture
 

Viewers also liked

Browsing The Source Code of Linux Packages
Browsing The Source Code of Linux PackagesBrowsing The Source Code of Linux Packages
Browsing The Source Code of Linux PackagesMotaz Saad
 
Knowledge discovery thru data mining
Knowledge discovery thru data miningKnowledge discovery thru data mining
Knowledge discovery thru data miningDevakumar Jain
 
Open Source Business Models
Open Source Business ModelsOpen Source Business Models
Open Source Business ModelsMotaz Saad
 
Cross Language Concept Mining
Cross Language Concept Mining Cross Language Concept Mining
Cross Language Concept Mining Motaz Saad
 
3.7 outlier analysis
3.7 outlier analysis3.7 outlier analysis
3.7 outlier analysisKrish_ver2
 
مقدمة في تكنواوجيا المعلومات
مقدمة في تكنواوجيا المعلوماتمقدمة في تكنواوجيا المعلومات
مقدمة في تكنواوجيا المعلوماتMotaz Saad
 
Hewahi, saad 2006 - class outliers mining distance-based approach
Hewahi, saad   2006 - class outliers mining distance-based approachHewahi, saad   2006 - class outliers mining distance-based approach
Hewahi, saad 2006 - class outliers mining distance-based approachMotaz Saad
 
Class Outlier Mining
Class Outlier MiningClass Outlier Mining
Class Outlier MiningMotaz Saad
 
OS Lab: Introduction to Linux
OS Lab: Introduction to LinuxOS Lab: Introduction to Linux
OS Lab: Introduction to LinuxMotaz Saad
 
Browsing Linux Kernel Source
Browsing Linux Kernel SourceBrowsing Linux Kernel Source
Browsing Linux Kernel SourceMotaz Saad
 
The x86 Family
The x86 FamilyThe x86 Family
The x86 FamilyMotaz Saad
 
Intel 64bit Architecture
Intel 64bit ArchitectureIntel 64bit Architecture
Intel 64bit ArchitectureMotaz Saad
 
Data Mining and Business Intelligence Tools
Data Mining and Business Intelligence ToolsData Mining and Business Intelligence Tools
Data Mining and Business Intelligence ToolsMotaz Saad
 
Structured Vs, Object Oriented Analysis and Design
Structured Vs, Object Oriented Analysis and DesignStructured Vs, Object Oriented Analysis and Design
Structured Vs, Object Oriented Analysis and DesignMotaz Saad
 
Data mining: Concepts and Techniques, Chapter12 outlier Analysis
Data mining: Concepts and Techniques, Chapter12 outlier Analysis Data mining: Concepts and Techniques, Chapter12 outlier Analysis
Data mining: Concepts and Techniques, Chapter12 outlier Analysis Salah Amean
 
Introduction to CLIPS Expert System
Introduction to CLIPS Expert SystemIntroduction to CLIPS Expert System
Introduction to CLIPS Expert SystemMotaz Saad
 

Viewers also liked (17)

Browsing The Source Code of Linux Packages
Browsing The Source Code of Linux PackagesBrowsing The Source Code of Linux Packages
Browsing The Source Code of Linux Packages
 
Knowledge discovery thru data mining
Knowledge discovery thru data miningKnowledge discovery thru data mining
Knowledge discovery thru data mining
 
Open Source Business Models
Open Source Business ModelsOpen Source Business Models
Open Source Business Models
 
Cross Language Concept Mining
Cross Language Concept Mining Cross Language Concept Mining
Cross Language Concept Mining
 
3.7 outlier analysis
3.7 outlier analysis3.7 outlier analysis
3.7 outlier analysis
 
مقدمة في تكنواوجيا المعلومات
مقدمة في تكنواوجيا المعلوماتمقدمة في تكنواوجيا المعلومات
مقدمة في تكنواوجيا المعلومات
 
Hewahi, saad 2006 - class outliers mining distance-based approach
Hewahi, saad   2006 - class outliers mining distance-based approachHewahi, saad   2006 - class outliers mining distance-based approach
Hewahi, saad 2006 - class outliers mining distance-based approach
 
Class Outlier Mining
Class Outlier MiningClass Outlier Mining
Class Outlier Mining
 
OS Lab: Introduction to Linux
OS Lab: Introduction to LinuxOS Lab: Introduction to Linux
OS Lab: Introduction to Linux
 
Browsing Linux Kernel Source
Browsing Linux Kernel SourceBrowsing Linux Kernel Source
Browsing Linux Kernel Source
 
The x86 Family
The x86 FamilyThe x86 Family
The x86 Family
 
Intel 64bit Architecture
Intel 64bit ArchitectureIntel 64bit Architecture
Intel 64bit Architecture
 
Data Mining: Outlier analysis
Data Mining: Outlier analysisData Mining: Outlier analysis
Data Mining: Outlier analysis
 
Data Mining and Business Intelligence Tools
Data Mining and Business Intelligence ToolsData Mining and Business Intelligence Tools
Data Mining and Business Intelligence Tools
 
Structured Vs, Object Oriented Analysis and Design
Structured Vs, Object Oriented Analysis and DesignStructured Vs, Object Oriented Analysis and Design
Structured Vs, Object Oriented Analysis and Design
 
Data mining: Concepts and Techniques, Chapter12 outlier Analysis
Data mining: Concepts and Techniques, Chapter12 outlier Analysis Data mining: Concepts and Techniques, Chapter12 outlier Analysis
Data mining: Concepts and Techniques, Chapter12 outlier Analysis
 
Introduction to CLIPS Expert System
Introduction to CLIPS Expert SystemIntroduction to CLIPS Expert System
Introduction to CLIPS Expert System
 

Similar to Assembly Language Lecture 3

Similar to Assembly Language Lecture 3 (20)

Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly Language
 
Mcs 17 solved assignment 2015- 16
Mcs 17 solved assignment 2015- 16Mcs 17 solved assignment 2015- 16
Mcs 17 solved assignment 2015- 16
 
System Software
System SoftwareSystem Software
System Software
 
Real to protected_mode
Real to protected_modeReal to protected_mode
Real to protected_mode
 
Sp chap2
Sp chap2Sp chap2
Sp chap2
 
5asm the stackandsubroutines
5asm the stackandsubroutines5asm the stackandsubroutines
5asm the stackandsubroutines
 
15CSL48 MP&MC manual
15CSL48 MP&MC manual15CSL48 MP&MC manual
15CSL48 MP&MC manual
 
PL/SQL and radix tree structure
PL/SQL and radix tree structurePL/SQL and radix tree structure
PL/SQL and radix tree structure
 
Microprocessor 8086-lab-mannual
Microprocessor 8086-lab-mannualMicroprocessor 8086-lab-mannual
Microprocessor 8086-lab-mannual
 
Assembler
AssemblerAssembler
Assembler
 
Assembler
AssemblerAssembler
Assembler
 
Keyboard interrupt
Keyboard interruptKeyboard interrupt
Keyboard interrupt
 
Debug(1).ppt
Debug(1).pptDebug(1).ppt
Debug(1).ppt
 
11thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp0111thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp01
 
11 Things About11g
11 Things About11g11 Things About11g
11 Things About11g
 
OpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developersOpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developers
 
Assembler
AssemblerAssembler
Assembler
 
Stack and subroutine
Stack and subroutineStack and subroutine
Stack and subroutine
 
Sangam 2019 - The Latest Features
Sangam 2019 - The Latest FeaturesSangam 2019 - The Latest Features
Sangam 2019 - The Latest Features
 

Recently uploaded

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Recently uploaded (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Assembly Language Lecture 3

  • 1. Assembly Language Fundamentals of Assembly language Motaz K. Saad Spring 2007 Motaz K. Saad, Dept. of CS
  • 2.
  • 3. 26AE CS 0044 IP Instruction address = ??????? Motaz K. Saad, Dept. of CS
  • 4. 26AE CS 0044 IP Instruction address = 26AE0 + 0044 _______________________ 26B24 25BD DS A03F00 26B24 Data address=?????? Motaz K. Saad, Dept. of CS
  • 5. 26AE CS 0044 IP Data address = 25BD0 + 003F _______________________ 25C0F 25BD DS Motaz K. Saad, Dept. of CS
  • 6.
  • 7.
  • 8. ; <your comments> ; Add two numbers and store the results into the third variable TITLE A04ASM1 (EXE) Move and add operations ; --------------------------------------------- .STACK ; ---------------------------------------------- .DATA FLDD DW 215 FLDE DW 125 FLDF DW ? ; ----------------------------------------------- .CODE MAIN PROC MOV AX,@DATA ;Set address of data MOV DS,AX ; segment in DS MOV AX,FLDD ;Move 0215 to AX ADD AX,FLDE ;Add 0125 to AX MOV FLDF,AX ;Store sum in FLDF MOV AX,4C00H ;End processing INT 21H MAIN ENDP ;End of procedure END MAIN ;End of program Comments COMMENTS Motaz K. Saad, Dept. of CS
  • 9. ; Add two numbers and store the results into the third variable TITLE A04ASM1 (EXE) Move and add operations ; --------------------------------------------- .STACK ; ---------------------------------------------- .DATA FLDD DW 0215H FLDE DW 0125H FLDF DW ? ; ----------------------------------------------- .CODE MAIN PROC MOV @DATA ;Set address of data MOV DS,AX ;Segment in DS MOV AX,FLDD ;Move 0215 to AX ADD AX,FLDE ;Add 0125 to AX MOV FLDF,AX ;Store sum in FLDF MOV AX,4C00H ;End processing INT 21H MAIN ENDP ;End of procedure END MAIN ;End of program IDENTIFIERS Motaz K. Saad, Dept. of CS
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. ; Add two numbers and store the results into the third variable page 60,132 TITLE A04ASM1 (EXE) Move and add operations ; --------------------------------------------- .STACK ; ---------------------------------------------- .DATA FLDD DW 215 FLDE DW 125 FLDF DW ? ; ----------------------------------------------- .CODE MAIN PROC MOV AX,@DATA ;Set address of data MOV DS,AX ;Segment in DS MOV AX,FLDD ;Move 0215 to AX ADD AX,FLDE ;Add 0125 to AX MOV FLDF,AX ;Store sum in FLDF MOV AX,4C00H ;End processing INT 21H MAIN ENDP ;End of procedure END MAIN ;End of program STATEMENTS Motaz K. Saad, Dept. of CS
  • 15.
  • 16. ; Add two numbers and store the results into the third variable page 60,132 page [length(10-255)],[width(60-132)] TITLE A04ASM1 (EXE) Move and add operations ; --------------------------------------------- .STACK ; ---------------------------------------------- .DATA FLDD DW 215 FLDE DW 125 FLDF DW ? ; ----------------------------------------------- .CODE MAIN PROC MOV AX,@DATA ;Set address of data MOV DS,AX ;Segment in DS MOV AX,FLDD ;Move 0215 to AX ADD AX,FLDE ;Add 0125 to AX MOV FLDF,AX ;Store sum in FLDF MOV AX,4C00H ;End processing INT 21H MAIN ENDP ;End of procedure END MAIN ;End of program Page directive Motaz K. Saad, Dept. of CS
  • 17. ; Add two numbers and store the results into the third variable page 10,70 TITLE A04ASM1 (EXE) Move and add operations ; --------------------------------------------- .STACK ; ---------------------------------------------- .DATA FLDD DW 215 FLDE DW 125 FLDF DW ? ; ----------------------------------------------- .CODE MAIN PROC MOV AX,@DATA ;Set address of data MOV DS,AX ;Segment in DS MOV AX,FLDD ;Move 0215 to AX ADD AX,FLDE ;Add 0125 to AX MOV FLDF,AX ;Store sum in FLDF MOV AX,4C00H ;End processing INT 21H MAIN ENDP ;End of procedure END MAIN ;End of program Page directive Motaz K. Saad, Dept. of CS
  • 18. Title directive Motaz K. Saad, Dept. of CS ; Add two numbers and store the results into the third variable page 10,70 TITLE A04ASM1 (EXE) Move and add operations ; --------------------------------------------- .STACK ; ---------------------------------------------- .DATA FLDD DW 215 FLDE DW 125 FLDF DW ? ; ----------------------------------------------- .CODE MAIN PROC MOV AX,@DATA ;Set address of data MOV DS,AX ;Segment in DS MOV AX,FLDD ;Move 0215 to AX ADD AX,FLDE ;Add 0125 to AX MOV FLDF,AX ;Store sum in FLDF MOV AX,4C00H ;End processing INT 21H MAIN ENDP ;End of procedure END MAIN ;End of program
  • 19. ; Add two numbers and store the results into the third variable page 60,132 TITLE A04ASM1 (EXE) Move and add operations ; --------------------------------------------- .STACK ; ---------------------------------------------- .DATA FLDD DW 215 FLDE DW 125 FLDF DW ? ; ----------------------------------------------- .CODE MAIN PROC MOV AX,@DATA ;Set address of data MOV FLDF,AX ;Store sum in FLDF MOV AX,4C00H ;End processing INT 21H MAIN ENDP ;End of procedure END MAIN ;End of program Segment directive Motaz K. Saad, Dept. of CS
  • 20. ; Add two numbers and store the results into the third variable page 60,132 TITLE A04ASM1 (EXE) Move and add operations ; --------------------------------------------- .STACK ; ---------------------------------------------- .DATA FLDD DW 215 FLDE DW 125 FLDF DW ? ; ----------------------------------------------- .CODE MAIN PROC MOV AX,@DATA ;Set address of data MOV DS,AX ;Segment in DS MOV AX,FLDD ;Move 0215 to AX MOV FLDF,AX ;Store sum in FLDF MOV AX,4C00H ;End processing INT 21H MAIN ENDP ; End of procedure END MAIN ;End of program PROC directive Motaz K. Saad, Dept. of CS
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.