SlideShare a Scribd company logo
Write Assembly code (8086) that implements the function of (A.B) +C.
Solution
nclude macros.asm ; pull in defs of macros begcode gotoxy ; define start of code seg called
gotoxy ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; C++ interface routine, C linkage. ; Puts cursor at row, col. ;
Usage: ; void gotoxy(int row, int col); IFNDEF DOS386 public _gotoxy ; make gotoxy
global _gotoxy proc near ; define start of func push BP ; save old stack frame mov
BP,SP ; set BP to point to old BP mov DH,P[BP] ; DH = row mov DL,P[BP+2] ; DL
= col mov AH,2 ; BIOS function set cursor pos. xor BX,BX ; page 0 int 10h
; BIOS video interrupt pop BP ; restore old BP ret ; return to caller _gotoxy
endp ; define end of func ELSE public _gotoxy ; make gotoxy global _gotoxy proc near
; define start of func push EBP ; save old stack frame mov EBP,ESP ; set EBP to
point to old BP uses ; saves registers that are used mov DH,P[EBP] ; DH = row mov
DL,P[EBP 4] ; DL = col mov AH,2 ; BIOS function set cursor pos. xor EBX,EBX ;
page 0 int 10h ; BIOS video interrupt unuse ; note reverse order pop EBP ;
restore old EBP ret ; return to caller _gotoxy endp ; define end of func ENDIF
endcode gotoxy ;define end of code seg end

More Related Content

PDF
Assembly Complete 8086 Instruction Set
PDF
Micro unit 3
PPTX
Instruction Set of 8086 Microprocessor
PDF
8085 instructions
PDF
8086 instructions
PDF
Intruction Set & Assembler Directives of 8086.pdf
PDF
Unit 2 assembly language programming
Assembly Complete 8086 Instruction Set
Micro unit 3
Instruction Set of 8086 Microprocessor
8085 instructions
8086 instructions
Intruction Set & Assembler Directives of 8086.pdf
Unit 2 assembly language programming

Similar to Write Assembly code (8086) that implements the function of (A.B) +C..pdf (20)

DOCX
Notes all instructions
PDF
PDF
Lecture5(1)
PPTX
PPT
Microprocessor 8086 PPT1.4 instruction set.ppt
PPT
8086 microprocessor assembler directives.ppt
PPT
Instruction set
PDF
4CS3-MPI-Unit-2.pdf microprocessor and interface
PPTX
Microprocessors and Microcontrollers ppt 2
PDF
8085_MicroelectronicAndMicroprocess.pdf
PPT
Instructions_introductionM2.1.about.microcontrollerppt
PPTX
8086 Instruction set
DOCX
Instruction set of 8086 Microprocessor
PPT
Assembly Language Programming Of 8085
PPT
Instruction set Madha Insstitute of Engineering
PPT
Malp edusat
PDF
8086 instruction set
PDF
8086 instruction set
Notes all instructions
Lecture5(1)
Microprocessor 8086 PPT1.4 instruction set.ppt
8086 microprocessor assembler directives.ppt
Instruction set
4CS3-MPI-Unit-2.pdf microprocessor and interface
Microprocessors and Microcontrollers ppt 2
8085_MicroelectronicAndMicroprocess.pdf
Instructions_introductionM2.1.about.microcontrollerppt
8086 Instruction set
Instruction set of 8086 Microprocessor
Assembly Language Programming Of 8085
Instruction set Madha Insstitute of Engineering
Malp edusat
8086 instruction set
8086 instruction set
Ad

More from gopalk44 (20)

PDF
My protease appears to affect bacteria, but not my own cells. What t.pdf
PDF
Name the phases in interphase, and describe what happens during those.pdf
PDF
Look for at least four definitions of accounting (from four differen.pdf
PDF
Match the word or phrase with the best description of it. ;An express.pdf
PDF
JAVAThe mean of a list of numbers is its arithmetic average. The .pdf
PDF
Know and understand the contributions of Hooke, van Leeuwenhoek, Cohn.pdf
PDF
ImplementDijkstra’s algorithm using the graph class you implemente.pdf
PDF
Illegal numbers.a. Complete the method find which accepts a collec.pdf
PDF
how many chromosomes will be found in each cell at the end of anapha.pdf
PDF
how are the technological approaches of cloning and IPSCs similar to.pdf
PDF
HELP! Thought I can figure this one out but got it wrong. I have one.pdf
PDF
From a recent statistical analysis for the last five years, on an av.pdf
PDF
Find asymptotic upperlower bounds. Find asymptotic upperlower boun.pdf
PDF
Explain how a wireless device can help an organization perform busin.pdf
PDF
Exam scores were normal in BIO 200. Jasons exam score was one stan.pdf
PDF
Discuss the various types of business crimes, a business liability f.pdf
PDF
Describe the different types of ribs. Which ribs are considered “fal.pdf
PDF
Circle the best answer to the following questions. From the Bohr mod.pdf
PDF
C++ ProgramN-number queue rotations.[16] Write methods void Que.pdf
PDF
Below are two possible tree topologies. How many clades are different.pdf
My protease appears to affect bacteria, but not my own cells. What t.pdf
Name the phases in interphase, and describe what happens during those.pdf
Look for at least four definitions of accounting (from four differen.pdf
Match the word or phrase with the best description of it. ;An express.pdf
JAVAThe mean of a list of numbers is its arithmetic average. The .pdf
Know and understand the contributions of Hooke, van Leeuwenhoek, Cohn.pdf
ImplementDijkstra’s algorithm using the graph class you implemente.pdf
Illegal numbers.a. Complete the method find which accepts a collec.pdf
how many chromosomes will be found in each cell at the end of anapha.pdf
how are the technological approaches of cloning and IPSCs similar to.pdf
HELP! Thought I can figure this one out but got it wrong. I have one.pdf
From a recent statistical analysis for the last five years, on an av.pdf
Find asymptotic upperlower bounds. Find asymptotic upperlower boun.pdf
Explain how a wireless device can help an organization perform busin.pdf
Exam scores were normal in BIO 200. Jasons exam score was one stan.pdf
Discuss the various types of business crimes, a business liability f.pdf
Describe the different types of ribs. Which ribs are considered “fal.pdf
Circle the best answer to the following questions. From the Bohr mod.pdf
C++ ProgramN-number queue rotations.[16] Write methods void Que.pdf
Below are two possible tree topologies. How many clades are different.pdf
Ad

Recently uploaded (20)

PPTX
Lesson notes of climatology university.
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
PDF
Weekly quiz Compilation Jan -July 25.pdf
PPTX
Cell Types and Its function , kingdom of life
PPTX
Digestion and Absorption of Carbohydrates, Proteina and Fats
PDF
Empowerment Technology for Senior High School Guide
PDF
RMMM.pdf make it easy to upload and study
PDF
Complications of Minimal Access Surgery at WLH
PDF
IGGE1 Understanding the Self1234567891011
PDF
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Lesson notes of climatology university.
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
Weekly quiz Compilation Jan -July 25.pdf
Cell Types and Its function , kingdom of life
Digestion and Absorption of Carbohydrates, Proteina and Fats
Empowerment Technology for Senior High School Guide
RMMM.pdf make it easy to upload and study
Complications of Minimal Access Surgery at WLH
IGGE1 Understanding the Self1234567891011
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape

Write Assembly code (8086) that implements the function of (A.B) +C..pdf

  • 1. Write Assembly code (8086) that implements the function of (A.B) +C. Solution nclude macros.asm ; pull in defs of macros begcode gotoxy ; define start of code seg called gotoxy ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; C++ interface routine, C linkage. ; Puts cursor at row, col. ; Usage: ; void gotoxy(int row, int col); IFNDEF DOS386 public _gotoxy ; make gotoxy global _gotoxy proc near ; define start of func push BP ; save old stack frame mov BP,SP ; set BP to point to old BP mov DH,P[BP] ; DH = row mov DL,P[BP+2] ; DL = col mov AH,2 ; BIOS function set cursor pos. xor BX,BX ; page 0 int 10h ; BIOS video interrupt pop BP ; restore old BP ret ; return to caller _gotoxy endp ; define end of func ELSE public _gotoxy ; make gotoxy global _gotoxy proc near ; define start of func push EBP ; save old stack frame mov EBP,ESP ; set EBP to point to old BP uses ; saves registers that are used mov DH,P[EBP] ; DH = row mov DL,P[EBP 4] ; DL = col mov AH,2 ; BIOS function set cursor pos. xor EBX,EBX ; page 0 int 10h ; BIOS video interrupt unuse ; note reverse order pop EBP ; restore old EBP ret ; return to caller _gotoxy endp ; define end of func ENDIF endcode gotoxy ;define end of code seg end