SlideShare une entreprise Scribd logo
1  sur  37
Assembly Language Instruction Addressing and Execution Motaz K. Saad Spring 2007 Motaz K. Saad, Dept. of CS
Lesson plan ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
Recalling main concepts Motaz K. Saad, Dept. of CS
Recalling main concepts Motaz K. Saad, Dept. of CS
Recalling main concepts ,[object Object],[object Object],Motaz K. Saad, Dept. of CS
Recalling main concepts Stack Segment Data Segment Code Segment SS DS CS Segment  Registers Motaz K. Saad, Dept. of CS
[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
Types of programs ,[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
Loading *.exe program ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
PSP Motaz K. Saad, Dept. of CS
Assembly directive to define memory model to use in the program . MODEL SMALL, .STACK .DATA MESSAGE DB "HELLO EVERYBODY! I AM LEARNING ASSEMBLY LANGUAGE!","$" .CODE MAIN PROC MOV AX, @DATA MOV DS,AX MOV AH,09 LEA DX,MESSAGE INT 21H MOV AX,4C00H INT 21H MAIN ENDP END MAIN Motaz K. Saad, Dept. of CS
Memory Model ,[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
Real and Protected mode Motaz K. Saad, Dept. of CS Real Mode  16-bit Protected Mode  32-bit Protected Mode  Segment base address   20-bit 24-bit, from  descriptor   32-bit, from  descriptor   Segment size (limit)  16-bit, 64K bytes (fixed)  16-bit, 1-64K bytes  20-bit, 1-1M bytes or 4K-4G bytes  Segment protection  no  yes  yes  Segment register  segment base address / 16  selector   selector
Protected mode ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
Booting process ,[object Object],[object Object],Motaz K. Saad, Dept. of CS cold boot Process of turning on a computer after it has been powered off completely warm boot Process of restarting a computer that is already powered on Also called a warm start
Booting process ,[object Object],processor BIOS hard disk CD-ROM drive (RAM) memory modules CMOS floppy disk drive Step 6 expansion cards Motaz K. Saad, Dept. of CS
How does a personal computer boot up? ,[object Object],[object Object],Motaz K. Saad, Dept. of CS
How does a personal computer boot up? ,[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
How does a personal computer boot up? ,[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
How does a personal computer boot up? ,[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
BIOS Boot process BIOS routine FFFF0H Interrupt  Vector Table BIOS Data  Areas Access  the bootstrap loader Check ports Initialize  devices Motaz K. Saad, Dept. of CS
BIOS Boot process ,[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
Assembly directive to define stack to use in the program . model small . STACK .DATA MESSAGE DB "HELLO EVERYBODY! I AM LEARNING ASSEMBLY LANGUAGE!","$" .CODE MAIN PROC MOV AX, @DATA MOV DS,AX MOV AH,09 LEA DX,MESSAGE INT 21H MOV AX,4C00H INT 21H MAIN ENDP END MAIN Motaz K. Saad, Dept. of CS
STACK ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
STACK ,[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
Lesson plan ,[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
Loading *.exe file Access *.exe from disk 256-byte  Program Segment Prefix  (PSP) on a paragraph boundary Store the program immediately following the PSP Load address of PSP in the DS & ES Load code segment in CS, set IP  Load address of the stack to SS, set SP Transfer control to the program for execution Motaz K. Saad, Dept. of CS
Loading *.exe file ,[object Object],[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
Practice 2B360H PSP Stack Segment Data Segment Code Segment Memory Motaz K. Saad, Dept. of CS
Practice 2B360H PSP Stack Segment Data Segment Code Segment Memory PSP  2B360H PSP size  100 H Offset  0H SS  2B460H (stored as 2B46) 2B46H SS Motaz K. Saad, Dept. of CS
Practice 2B360H PSP Stack Segment Data Segment Code Segment Memory 2B46H SS PSP  2B360H PSP size  100H Offset  30H     70H CS  2B500H (stored as 2B50) CS 2B50H Motaz K. Saad, Dept. of CS
Practice 2B360H PSP Stack Segment Data Segment Code Segment Memory 2B46H SS CS 2B50H 2B36H 2B36H DS ES SP 0030H Motaz K. Saad, Dept. of CS
Instruction Execution and Addressing ,[object Object],[object Object],[object Object],[object Object],Motaz K. Saad, Dept. of CS
Example 4AF0 CS 0013 IP   4AF13H   04B1 DS Motaz K. Saad, Dept. of CS CS segment address: 4AF00H IP offset:   0013H ________________________ + Instruction address:
Example 4AF0 CS 0013 IP   4AF13H A01200 Memory 04B1 DS Decode instruction: AO: MOV [0012] to AL Motaz K. Saad, Dept. of CS
Example 4AF0 CS 0013 IP   04B03H A01200 Memory 04B1 DS 04B22H Motaz K. Saad, Dept. of CS DS segment address:04B10H IP offset:   0012H ________________________ + Data address:
Example 4AF0 CS 0013 IP   04B03H A01200 1B Memory 04B1 DS 04B22 Data address: 04B22H Motaz K. Saad, Dept. of CS | 1B AX AX AH AL

Contenu connexe

Tendances

Chapter 6 Flow control Instructions
Chapter 6 Flow control InstructionsChapter 6 Flow control Instructions
Chapter 6 Flow control Instructionswarda aziz
 
8086 instructions
8086 instructions8086 instructions
8086 instructionsRavi Anand
 
Assembly Language Lecture 4
Assembly Language Lecture 4Assembly Language Lecture 4
Assembly Language Lecture 4Motaz Saad
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086aviban
 
Jumps in Assembly Language.
Jumps in Assembly Language.Jumps in Assembly Language.
Jumps in Assembly Language.NA000000
 
Assembly language programming_fundamentals 8086
Assembly language programming_fundamentals 8086Assembly language programming_fundamentals 8086
Assembly language programming_fundamentals 8086Shehrevar Davierwala
 
Assembly language 8086
Assembly language 8086Assembly language 8086
Assembly language 8086John Cutajar
 
8086 microprocessor instruction set by Er. Swapnil Kaware
8086 microprocessor instruction set by Er. Swapnil Kaware8086 microprocessor instruction set by Er. Swapnil Kaware
8086 microprocessor instruction set by Er. Swapnil KawareProf. Swapnil V. Kaware
 
01 GPIO||General Purpose Input Output.2016
01 GPIO||General Purpose Input Output.201601 GPIO||General Purpose Input Output.2016
01 GPIO||General Purpose Input Output.2016Mohamed Fawzy
 
Chapter 2 The 8088 Microprocessor
Chapter 2   The 8088 MicroprocessorChapter 2   The 8088 Microprocessor
Chapter 2 The 8088 MicroprocessorDwight Sabio
 
PAI Unit 2 Protection in 80386 segmentation
PAI Unit 2 Protection in 80386 segmentationPAI Unit 2 Protection in 80386 segmentation
PAI Unit 2 Protection in 80386 segmentationKanchanPatil34
 
instruction set of 8086
instruction set of 8086instruction set of 8086
instruction set of 8086muneer.k
 
Stack Operations
Stack Operations Stack Operations
Stack Operations RidaZaman1
 

Tendances (20)

RAM Design
RAM DesignRAM Design
RAM Design
 
Chapter 6 Flow control Instructions
Chapter 6 Flow control InstructionsChapter 6 Flow control Instructions
Chapter 6 Flow control Instructions
 
8086 instructions
8086 instructions8086 instructions
8086 instructions
 
Assignment on alp
Assignment on alpAssignment on alp
Assignment on alp
 
Assembly Language Lecture 4
Assembly Language Lecture 4Assembly Language Lecture 4
Assembly Language Lecture 4
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Jumps in Assembly Language.
Jumps in Assembly Language.Jumps in Assembly Language.
Jumps in Assembly Language.
 
Assembly language programming_fundamentals 8086
Assembly language programming_fundamentals 8086Assembly language programming_fundamentals 8086
Assembly language programming_fundamentals 8086
 
Assembly language 8086
Assembly language 8086Assembly language 8086
Assembly language 8086
 
Instruction formats-in-8086
Instruction formats-in-8086Instruction formats-in-8086
Instruction formats-in-8086
 
8086 microprocessor instruction set by Er. Swapnil Kaware
8086 microprocessor instruction set by Er. Swapnil Kaware8086 microprocessor instruction set by Er. Swapnil Kaware
8086 microprocessor instruction set by Er. Swapnil Kaware
 
8086 addressing modes
8086 addressing modes8086 addressing modes
8086 addressing modes
 
01 GPIO||General Purpose Input Output.2016
01 GPIO||General Purpose Input Output.201601 GPIO||General Purpose Input Output.2016
01 GPIO||General Purpose Input Output.2016
 
Chapter 2 The 8088 Microprocessor
Chapter 2   The 8088 MicroprocessorChapter 2   The 8088 Microprocessor
Chapter 2 The 8088 Microprocessor
 
8086 String Instructions.pdf
8086 String Instructions.pdf8086 String Instructions.pdf
8086 String Instructions.pdf
 
PAI Unit 2 Protection in 80386 segmentation
PAI Unit 2 Protection in 80386 segmentationPAI Unit 2 Protection in 80386 segmentation
PAI Unit 2 Protection in 80386 segmentation
 
instruction set of 8086
instruction set of 8086instruction set of 8086
instruction set of 8086
 
Assembly Language
Assembly LanguageAssembly Language
Assembly Language
 
8086 instruction set
8086  instruction set8086  instruction set
8086 instruction set
 
Stack Operations
Stack Operations Stack Operations
Stack Operations
 

Similaire à Assembly Language Lecture 1

Instruction addressing and execution
Instruction addressing and executionInstruction addressing and execution
Instruction addressing and executionSilvia
 
The x86 Family
The x86 FamilyThe x86 Family
The x86 FamilyMotaz Saad
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly LanguageAhmed M. Abed
 
Assembly Language Lecture 2
Assembly Language Lecture 2Assembly Language Lecture 2
Assembly Language Lecture 2Motaz Saad
 
Computer Hardware & Software Lab Manual 2
Computer Hardware & Software Lab Manual 2Computer Hardware & Software Lab Manual 2
Computer Hardware & Software Lab Manual 2senayteklay
 
C Dos Bas
C Dos BasC Dos Bas
C Dos BasCTIN
 
Buffer overflow – Smashing The Stack
Buffer overflow – Smashing The StackBuffer overflow – Smashing The Stack
Buffer overflow – Smashing The StackTomer Zait
 
Session01_Intro.pdf
Session01_Intro.pdfSession01_Intro.pdf
Session01_Intro.pdfRahnerJames
 
8086 MICROPROCESSOR
8086 MICROPROCESSOR8086 MICROPROCESSOR
8086 MICROPROCESSORAlxus Shuvo
 
Rapid Prototyping with AWS IoT and Mongoose OS on ESP32 Platform
Rapid Prototyping with AWS IoT and Mongoose OS on ESP32 PlatformRapid Prototyping with AWS IoT and Mongoose OS on ESP32 Platform
Rapid Prototyping with AWS IoT and Mongoose OS on ESP32 PlatformAmazon Web Services
 
Assembly language programming(unit 4)
Assembly language programming(unit 4)Assembly language programming(unit 4)
Assembly language programming(unit 4)Ashim Saha
 
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
 
Bnt202 understanding pc & trouble shooting
Bnt202 understanding pc & trouble shootingBnt202 understanding pc & trouble shooting
Bnt202 understanding pc & trouble shootingsmumbahelp
 

Similaire à Assembly Language Lecture 1 (20)

Instruction addressing and execution
Instruction addressing and executionInstruction addressing and execution
Instruction addressing and execution
 
The x86 Family
The x86 FamilyThe x86 Family
The x86 Family
 
MASM.pptx
MASM.pptxMASM.pptx
MASM.pptx
 
IMD 203 - Ch06
IMD 203 - Ch06IMD 203 - Ch06
IMD 203 - Ch06
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly Language
 
Assembly Language Lecture 2
Assembly Language Lecture 2Assembly Language Lecture 2
Assembly Language Lecture 2
 
Computer Hardware & Software Lab Manual 2
Computer Hardware & Software Lab Manual 2Computer Hardware & Software Lab Manual 2
Computer Hardware & Software Lab Manual 2
 
Project eprom progr
Project eprom progrProject eprom progr
Project eprom progr
 
C Dos Bas
C Dos BasC Dos Bas
C Dos Bas
 
Buffer overflow – Smashing The Stack
Buffer overflow – Smashing The StackBuffer overflow – Smashing The Stack
Buffer overflow – Smashing The Stack
 
Chapter 3 programming concepts-ii
Chapter 3  programming concepts-iiChapter 3  programming concepts-ii
Chapter 3 programming concepts-ii
 
Session01_Intro.pdf
Session01_Intro.pdfSession01_Intro.pdf
Session01_Intro.pdf
 
ROM BIOS & POST
ROM BIOS & POSTROM BIOS & POST
ROM BIOS & POST
 
ROM BIOS & POST
ROM BIOS & POSTROM BIOS & POST
ROM BIOS & POST
 
8086 MICROPROCESSOR
8086 MICROPROCESSOR8086 MICROPROCESSOR
8086 MICROPROCESSOR
 
Rapid Prototyping with AWS IoT and Mongoose OS on ESP32 Platform
Rapid Prototyping with AWS IoT and Mongoose OS on ESP32 PlatformRapid Prototyping with AWS IoT and Mongoose OS on ESP32 Platform
Rapid Prototyping with AWS IoT and Mongoose OS on ESP32 Platform
 
Assembly language programming(unit 4)
Assembly language programming(unit 4)Assembly language programming(unit 4)
Assembly language programming(unit 4)
 
Mp &mc programs
Mp &mc programsMp &mc programs
Mp &mc programs
 
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 ...
 
Bnt202 understanding pc & trouble shooting
Bnt202 understanding pc & trouble shootingBnt202 understanding pc & trouble shooting
Bnt202 understanding pc & trouble shooting
 

Plus de Motaz Saad

Cross Language Concept Mining
Cross Language Concept Mining Cross Language Concept Mining
Cross Language Concept Mining 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
 
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
 
Open Source Business Models
Open Source Business ModelsOpen Source Business Models
Open Source Business ModelsMotaz Saad
 
OS Lab: Introduction to Linux
OS Lab: Introduction to LinuxOS Lab: Introduction to Linux
OS Lab: Introduction to LinuxMotaz Saad
 
Introduction to CLIPS Expert System
Introduction to CLIPS Expert SystemIntroduction to CLIPS Expert System
Introduction to CLIPS Expert SystemMotaz Saad
 
Intel 64bit Architecture
Intel 64bit ArchitectureIntel 64bit Architecture
Intel 64bit ArchitectureMotaz Saad
 
Assembly Language Lecture 3
Assembly Language Lecture 3Assembly Language Lecture 3
Assembly Language Lecture 3Motaz Saad
 
Introduction to Assembly Language
Introduction to Assembly LanguageIntroduction to Assembly Language
Introduction to Assembly LanguageMotaz Saad
 
Class Outlier Mining
Class Outlier MiningClass Outlier Mining
Class Outlier MiningMotaz Saad
 
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
 
مقدمة في تكنواوجيا المعلومات
مقدمة في تكنواوجيا المعلوماتمقدمة في تكنواوجيا المعلومات
مقدمة في تكنواوجيا المعلوماتMotaz 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
 
Browsing Linux Kernel Source
Browsing Linux Kernel SourceBrowsing Linux Kernel Source
Browsing Linux Kernel SourceMotaz Saad
 

Plus de Motaz Saad (14)

Cross Language Concept Mining
Cross Language Concept Mining Cross Language Concept Mining
Cross Language Concept Mining
 
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
 
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
 
Open Source Business Models
Open Source Business ModelsOpen Source Business Models
Open Source Business Models
 
OS Lab: Introduction to Linux
OS Lab: Introduction to LinuxOS Lab: Introduction to Linux
OS Lab: Introduction to Linux
 
Introduction to CLIPS Expert System
Introduction to CLIPS Expert SystemIntroduction to CLIPS Expert System
Introduction to CLIPS Expert System
 
Intel 64bit Architecture
Intel 64bit ArchitectureIntel 64bit Architecture
Intel 64bit Architecture
 
Assembly Language Lecture 3
Assembly Language Lecture 3Assembly Language Lecture 3
Assembly Language Lecture 3
 
Introduction to Assembly Language
Introduction to Assembly LanguageIntroduction to Assembly Language
Introduction to Assembly Language
 
Class Outlier Mining
Class Outlier MiningClass Outlier Mining
Class Outlier Mining
 
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
 
مقدمة في تكنواوجيا المعلومات
مقدمة في تكنواوجيا المعلوماتمقدمة في تكنواوجيا المعلومات
مقدمة في تكنواوجيا المعلومات
 
Data Mining and Business Intelligence Tools
Data Mining and Business Intelligence ToolsData Mining and Business Intelligence Tools
Data Mining and Business Intelligence Tools
 
Browsing Linux Kernel Source
Browsing Linux Kernel SourceBrowsing Linux Kernel Source
Browsing Linux Kernel Source
 

Dernier

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Dernier (20)

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 

Assembly Language Lecture 1

  • 1. Assembly Language Instruction Addressing and Execution Motaz K. Saad Spring 2007 Motaz K. Saad, Dept. of CS
  • 2.
  • 3. Recalling main concepts Motaz K. Saad, Dept. of CS
  • 4. Recalling main concepts Motaz K. Saad, Dept. of CS
  • 5.
  • 6. Recalling main concepts Stack Segment Data Segment Code Segment SS DS CS Segment Registers Motaz K. Saad, Dept. of CS
  • 7.
  • 8.
  • 9.
  • 10. PSP Motaz K. Saad, Dept. of CS
  • 11. Assembly directive to define memory model to use in the program . MODEL SMALL, .STACK .DATA MESSAGE DB "HELLO EVERYBODY! I AM LEARNING ASSEMBLY LANGUAGE!","$" .CODE MAIN PROC MOV AX, @DATA MOV DS,AX MOV AH,09 LEA DX,MESSAGE INT 21H MOV AX,4C00H INT 21H MAIN ENDP END MAIN Motaz K. Saad, Dept. of CS
  • 12.
  • 13. Real and Protected mode Motaz K. Saad, Dept. of CS Real Mode 16-bit Protected Mode 32-bit Protected Mode Segment base address 20-bit 24-bit, from descriptor 32-bit, from descriptor Segment size (limit) 16-bit, 64K bytes (fixed) 16-bit, 1-64K bytes 20-bit, 1-1M bytes or 4K-4G bytes Segment protection no yes yes Segment register segment base address / 16 selector selector
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21. BIOS Boot process BIOS routine FFFF0H Interrupt Vector Table BIOS Data Areas Access the bootstrap loader Check ports Initialize devices Motaz K. Saad, Dept. of CS
  • 22.
  • 23. Assembly directive to define stack to use in the program . model small . STACK .DATA MESSAGE DB "HELLO EVERYBODY! I AM LEARNING ASSEMBLY LANGUAGE!","$" .CODE MAIN PROC MOV AX, @DATA MOV DS,AX MOV AH,09 LEA DX,MESSAGE INT 21H MOV AX,4C00H INT 21H MAIN ENDP END MAIN Motaz K. Saad, Dept. of CS
  • 24.
  • 25.
  • 26.
  • 27. Loading *.exe file Access *.exe from disk 256-byte Program Segment Prefix (PSP) on a paragraph boundary Store the program immediately following the PSP Load address of PSP in the DS & ES Load code segment in CS, set IP Load address of the stack to SS, set SP Transfer control to the program for execution Motaz K. Saad, Dept. of CS
  • 28.
  • 29. Practice 2B360H PSP Stack Segment Data Segment Code Segment Memory Motaz K. Saad, Dept. of CS
  • 30. Practice 2B360H PSP Stack Segment Data Segment Code Segment Memory PSP 2B360H PSP size 100 H Offset 0H SS 2B460H (stored as 2B46) 2B46H SS Motaz K. Saad, Dept. of CS
  • 31. Practice 2B360H PSP Stack Segment Data Segment Code Segment Memory 2B46H SS PSP 2B360H PSP size 100H Offset 30H 70H CS 2B500H (stored as 2B50) CS 2B50H Motaz K. Saad, Dept. of CS
  • 32. Practice 2B360H PSP Stack Segment Data Segment Code Segment Memory 2B46H SS CS 2B50H 2B36H 2B36H DS ES SP 0030H Motaz K. Saad, Dept. of CS
  • 33.
  • 34. Example 4AF0 CS 0013 IP 4AF13H 04B1 DS Motaz K. Saad, Dept. of CS CS segment address: 4AF00H IP offset: 0013H ________________________ + Instruction address:
  • 35. Example 4AF0 CS 0013 IP 4AF13H A01200 Memory 04B1 DS Decode instruction: AO: MOV [0012] to AL Motaz K. Saad, Dept. of CS
  • 36. Example 4AF0 CS 0013 IP 04B03H A01200 Memory 04B1 DS 04B22H Motaz K. Saad, Dept. of CS DS segment address:04B10H IP offset: 0012H ________________________ + Data address:
  • 37. Example 4AF0 CS 0013 IP 04B03H A01200 1B Memory 04B1 DS 04B22 Data address: 04B22H Motaz K. Saad, Dept. of CS | 1B AX AX AH AL