SlideShare a Scribd company logo
Alex Jhonatan Toapanta Molina | Compiladores | 19 de abril de 2018
Informe de Instalación de
Ensamblador EMU8086
PÁGINA 1
INSTALACION DEL ENSAMBLADOR EMU8086
PÁGINA 2
PÁGINA 3
PÁGINA 4
PÁGINA 5
DECOMPILACION HOLAMUNDO
.model small
.stack
.data
saludo db "Hola mundo!!!n Alex Toapanta - PUCE-SI - Compiladores - 19/4/2018", "$"
PÁGINA 6
.code
main proc ;Inicia proceso
mov ax,seg saludo ;hmm ¿seg?
mov ds,ax ;ds = ax = saludo
mov ah,09 ;Function(print string)
lea dx,saludo ;DX = String terminated by "$"
int 21h ;Interruptions DOS Functions
;mensaje en pantalla
mov ax,4c00h ;Function (Quit with exit code (EXIT))
int 21h ;Interruption DOS Functions
main endp ;Termina proceso
end main
PÁGINA 7
Compilar un programa que permita comparar 2 números del 0 al 9.
name "calc-sum"
org 100h ; directive make tiny com file.
; calculate the sum of elements in vector,
; store result in m and print it in binary code.
; number of elements:
mov cx, 10
; al will store the sum:
mov al, 0
; bx is an index:
PÁGINA 8
mov bx, 0
; sum elements:
next: add al, vector[bx]
; next byte:
inc bx
; loop until cx=0:
loop next
; store result in m:
mov m, al
; print result in binary:
mov bl, m
mov cx, 8
print: mov ah, 2 ; print function.
Mov dl, '0'
test bl, 10000000b ; test first bit.
jz zero
mov dl, '1'
zero: int 21h
shl bl, 1
loop print
; print binary suffix:
mov dl, 'b'
int 21h
mov dl, 0ah ; new line.
int 21h
mov dl, 0dh ; carrige return.
int 21h
; print result in decimal:
mov al, m
call print_al
; wait for any key press:
mov ah, 0
int 16h
ret
; variables:
vector db 5, 4, 5, 2, 1, 9, 1, 2, 5, 7
m db 0
print_al proc
cmp al, 0
jne print_al_r
push ax
mov al, '0'
mov ah, 0eh
int 10h
pop ax
ret
print_al_r:
pusha
mov ah, 0
cmp ax, 0
je pn_done
mov dl, 10
div dl
PÁGINA 9
call print_al_r
mov al, ah
add al, 30h
mov ah, 0eh
int 10h
jmp pn_done
pn_done:
popa
ret
endp
COMPILAR UN PROGRAMA QUE PERMITA SUMAR 10 VALORES ASIGNADOS EN UN
VECTOR
PÁGINA 10
name "calc-sum"
org 100h ; directive make tiny com file.
; calculate the sum of elements in vector,
; store result in m and print it in binary code.
; number of elements:
mov cx, 10
; al will store the sum:
mov al, 0
; bx is an index:
mov bx, 0
; sum elements:
next: add al, vector[bx]
; next byte:
inc bx
; loop until cx=0:
loop next
; store result in m:
mov m, al
; print result in binary:
mov bl, m
mov cx, 8
print: mov ah, 2 ; print function.
Mov dl, '0'
test bl, 10000000b ; test first bit.
jz zero
mov dl, '1'
zero: int 21h
shl bl, 1
loop print
; print binary suffix:
mov dl, 'b'
int 21h
PÁGINA 11
mov dl, 0ah ; new line.
int 21h
mov dl, 0dh ; carrige return.
int 21h
; print result in decimal:
mov al, m
call print_al
; wait for any key press:
mov ah, 0
int 16h
ret
; variables:
vector db 5, 4, 5, 2, 1, 9, 1, 2, 5, 7
m db 0
print_al proc
cmp al, 0
jne print_al_r
push ax
mov al, '0'
mov ah, 0eh
int 10h
pop ax
ret
print_al_r:
pusha
mov ah, 0
cmp ax, 0
je pn_done
mov dl, 10
div dl
call print_al_r
mov al, ah
add al, 30h
mov ah, 0eh
int 10h
jmp pn_done
pn_done:
popa
ret
endp
PÁGINA 12
DECOMPILACION DE UN PROGRAMA ADICIONAL
COMPARAR SI DOS CADENAS SON IGUALES
org 100h
comienzo:
PÁGINA 13
mov si, x
mov al, msg2[si]
cmp msg[si], al ;comparar letra por letra las cadenas, si uno no coincide mand
a directamente a fin y termina el programa
jne fin:
cmp msg[si], "$" ;si es el final y el programa llega aca, quiere decir que son
iguales
jz final:
inc x
loop comienzo
final:
mov dx, offset msg3
mov ah, 9
int 21h
fin:
ret
msg db "hello world $"
msg2 db "hello world $"
msg3 db "Son iguales $"
x dw 0

More Related Content

What's hot

Job09
Job09Job09
Java Code for Sample Projects Methods
Java Code for Sample Projects MethodsJava Code for Sample Projects Methods
Java Code for Sample Projects Methods
jwjablonski
 
คำสั่ง For
คำสั่ง Forคำสั่ง For
คำสั่ง For
kramsri
 
Compiladores emu8086
Compiladores emu8086Compiladores emu8086
Compiladores emu8086
JhOnss KrIollo
 
Kelompok 4
Kelompok 4Kelompok 4
Kelompok 4
Wita Kizz WisymAru
 
Instalación de emu8086 y compilados
Instalación de emu8086 y compiladosInstalación de emu8086 y compilados
Instalación de emu8086 y compilados
Diego Erazo
 
Assignement of programming & problem solving
Assignement of programming & problem solvingAssignement of programming & problem solving
Assignement of programming & problem solving
Syed Umair
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
Mohammed Khan
 
Week 7
Week 7Week 7
Week 7
WanSurang FK
 
Compiladoresemulador
CompiladoresemuladorCompiladoresemulador
Compiladoresemulador
David Caicedo
 
Michael kontopoulos
Michael kontopoulosMichael kontopoulos
Michael kontopoulos
josnihmurni2907
 
Advanced QUnit - Front-End JavaScript Unit Testing
Advanced QUnit - Front-End JavaScript Unit TestingAdvanced QUnit - Front-End JavaScript Unit Testing
Advanced QUnit - Front-End JavaScript Unit Testing
Lars Thorup
 
Algoritmos ensambladores
Algoritmos ensambladoresAlgoritmos ensambladores
Algoritmos ensambladores
Maurock Charolastra Muñoz
 
algorithmdivs
algorithmdivsalgorithmdivs
algorithmdivs
Divya Ravindran
 
Coding with Vim
Coding with VimCoding with Vim
Coding with Vim
Enzo Wang
 
Cse presentation ratul
Cse presentation ratulCse presentation ratul
Cse presentation ratul
Hassan Ratul
 
Exp 8...
Exp 8...Exp 8...
Exp 8...
Harish Khodke
 
Useless Box
Useless BoxUseless Box
Python 3 - tutorial
Python 3 - tutorialPython 3 - tutorial
Python 3 - tutorial
Andrews Medina
 

What's hot (19)

Job09
Job09Job09
Job09
 
Java Code for Sample Projects Methods
Java Code for Sample Projects MethodsJava Code for Sample Projects Methods
Java Code for Sample Projects Methods
 
คำสั่ง For
คำสั่ง Forคำสั่ง For
คำสั่ง For
 
Compiladores emu8086
Compiladores emu8086Compiladores emu8086
Compiladores emu8086
 
Kelompok 4
Kelompok 4Kelompok 4
Kelompok 4
 
Instalación de emu8086 y compilados
Instalación de emu8086 y compiladosInstalación de emu8086 y compilados
Instalación de emu8086 y compilados
 
Assignement of programming & problem solving
Assignement of programming & problem solvingAssignement of programming & problem solving
Assignement of programming & problem solving
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Week 7
Week 7Week 7
Week 7
 
Compiladoresemulador
CompiladoresemuladorCompiladoresemulador
Compiladoresemulador
 
Michael kontopoulos
Michael kontopoulosMichael kontopoulos
Michael kontopoulos
 
Advanced QUnit - Front-End JavaScript Unit Testing
Advanced QUnit - Front-End JavaScript Unit TestingAdvanced QUnit - Front-End JavaScript Unit Testing
Advanced QUnit - Front-End JavaScript Unit Testing
 
Algoritmos ensambladores
Algoritmos ensambladoresAlgoritmos ensambladores
Algoritmos ensambladores
 
algorithmdivs
algorithmdivsalgorithmdivs
algorithmdivs
 
Coding with Vim
Coding with VimCoding with Vim
Coding with Vim
 
Cse presentation ratul
Cse presentation ratulCse presentation ratul
Cse presentation ratul
 
Exp 8...
Exp 8...Exp 8...
Exp 8...
 
Useless Box
Useless BoxUseless Box
Useless Box
 
Python 3 - tutorial
Python 3 - tutorialPython 3 - tutorial
Python 3 - tutorial
 

Similar to Instalación de emu8086

Assembler
AssemblerAssembler
Taller practico emu8086_galarraga
Taller practico emu8086_galarragaTaller practico emu8086_galarraga
Taller practico emu8086_galarraga
Fabricio Galárraga
 
Taller Ensambladores
Taller EnsambladoresTaller Ensambladores
Taller Ensambladores
Christian Morales
 
chapter 7 Logic, shift and rotate instructions
chapter 7 Logic, shift and rotate instructionschapter 7 Logic, shift and rotate instructions
chapter 7 Logic, shift and rotate instructions
warda aziz
 
Emulador de ensamblador emu8086
Emulador de ensamblador emu8086Emulador de ensamblador emu8086
Emulador de ensamblador emu8086
Marco Muñoz
 
Chapter 6 Flow control Instructions
Chapter 6 Flow control InstructionsChapter 6 Flow control Instructions
Chapter 6 Flow control Instructions
warda aziz
 
1) (a) Write a code fragment which adds the 32-bit contents of $8100.pdf
1) (a) Write a code fragment which adds the 32-bit contents of $8100.pdf1) (a) Write a code fragment which adds the 32-bit contents of $8100.pdf
1) (a) Write a code fragment which adds the 32-bit contents of $8100.pdf
aromanets
 
Assembly language programs 2
Assembly language programs 2Assembly language programs 2
Assembly language programs 2
HarshitParkar6677
 
Emuladores
EmuladoresEmuladores
Emuladores
Bayoch
 
Lab report assembly
Lab report assemblyLab report assembly
Lab report assembly
Syed Ahmed Zaki
 
Assembly language programs
Assembly language programsAssembly language programs
Assembly language programs
HarshitParkar6677
 
Lecture6
Lecture6Lecture6
Microprocessor and micro-controller lab (assembly programming)
Microprocessor and micro-controller lab (assembly programming)Microprocessor and micro-controller lab (assembly programming)
Microprocessor and micro-controller lab (assembly programming)
shamim hossain
 
Plsql programs(encrypted)
Plsql programs(encrypted)Plsql programs(encrypted)
Plsql programs(encrypted)
Karunakar Singh Thakur
 
Mcs 17 solved assignment 2015- 16
Mcs 17 solved assignment 2015- 16Mcs 17 solved assignment 2015- 16
Mcs 17 solved assignment 2015- 16
Indira Gnadhi National Open University (IGNOU)
 
Maicrocontroller lab basic experiments
Maicrocontroller lab basic experimentsMaicrocontroller lab basic experiments
Maicrocontroller lab basic experiments
Noor Tahasildar
 
Maicrocontroller lab basic experiments
Maicrocontroller lab basic experimentsMaicrocontroller lab basic experiments
Maicrocontroller lab basic experiments
noorahamed tahasildar
 
Calculator 8086 Assembly Language Programming
Calculator 8086 Assembly Language Programming Calculator 8086 Assembly Language Programming
Calculator 8086 Assembly Language Programming
Sami Ullah
 
Maicrocontroller lab basic experiments
Maicrocontroller lab basic experiments Maicrocontroller lab basic experiments
Maicrocontroller lab basic experiments
noorahamed tahasildar
 
Micro Controller lab basic experiments (1)
Micro Controller lab basic experiments (1)Micro Controller lab basic experiments (1)
Micro Controller lab basic experiments (1)
Noor Tahasildar
 

Similar to Instalación de emu8086 (20)

Assembler
AssemblerAssembler
Assembler
 
Taller practico emu8086_galarraga
Taller practico emu8086_galarragaTaller practico emu8086_galarraga
Taller practico emu8086_galarraga
 
Taller Ensambladores
Taller EnsambladoresTaller Ensambladores
Taller Ensambladores
 
chapter 7 Logic, shift and rotate instructions
chapter 7 Logic, shift and rotate instructionschapter 7 Logic, shift and rotate instructions
chapter 7 Logic, shift and rotate instructions
 
Emulador de ensamblador emu8086
Emulador de ensamblador emu8086Emulador de ensamblador emu8086
Emulador de ensamblador emu8086
 
Chapter 6 Flow control Instructions
Chapter 6 Flow control InstructionsChapter 6 Flow control Instructions
Chapter 6 Flow control Instructions
 
1) (a) Write a code fragment which adds the 32-bit contents of $8100.pdf
1) (a) Write a code fragment which adds the 32-bit contents of $8100.pdf1) (a) Write a code fragment which adds the 32-bit contents of $8100.pdf
1) (a) Write a code fragment which adds the 32-bit contents of $8100.pdf
 
Assembly language programs 2
Assembly language programs 2Assembly language programs 2
Assembly language programs 2
 
Emuladores
EmuladoresEmuladores
Emuladores
 
Lab report assembly
Lab report assemblyLab report assembly
Lab report assembly
 
Assembly language programs
Assembly language programsAssembly language programs
Assembly language programs
 
Lecture6
Lecture6Lecture6
Lecture6
 
Microprocessor and micro-controller lab (assembly programming)
Microprocessor and micro-controller lab (assembly programming)Microprocessor and micro-controller lab (assembly programming)
Microprocessor and micro-controller lab (assembly programming)
 
Plsql programs(encrypted)
Plsql programs(encrypted)Plsql programs(encrypted)
Plsql programs(encrypted)
 
Mcs 17 solved assignment 2015- 16
Mcs 17 solved assignment 2015- 16Mcs 17 solved assignment 2015- 16
Mcs 17 solved assignment 2015- 16
 
Maicrocontroller lab basic experiments
Maicrocontroller lab basic experimentsMaicrocontroller lab basic experiments
Maicrocontroller lab basic experiments
 
Maicrocontroller lab basic experiments
Maicrocontroller lab basic experimentsMaicrocontroller lab basic experiments
Maicrocontroller lab basic experiments
 
Calculator 8086 Assembly Language Programming
Calculator 8086 Assembly Language Programming Calculator 8086 Assembly Language Programming
Calculator 8086 Assembly Language Programming
 
Maicrocontroller lab basic experiments
Maicrocontroller lab basic experiments Maicrocontroller lab basic experiments
Maicrocontroller lab basic experiments
 
Micro Controller lab basic experiments (1)
Micro Controller lab basic experiments (1)Micro Controller lab basic experiments (1)
Micro Controller lab basic experiments (1)
 

More from Alex Toapanta

Practica pishing 2
Practica pishing 2Practica pishing 2
Practica pishing 2
Alex Toapanta
 
Practica instalación maquinas virtuales en VMware
Practica instalación maquinas virtuales en VMwarePractica instalación maquinas virtuales en VMware
Practica instalación maquinas virtuales en VMware
Alex Toapanta
 
Practica 3 Informática Legal
Practica 3 Informática LegalPractica 3 Informática Legal
Practica 3 Informática Legal
Alex Toapanta
 
Practica nro 2 Informática Forense
Practica nro 2 Informática ForensePractica nro 2 Informática Forense
Practica nro 2 Informática Forense
Alex Toapanta
 
Practica recuperar archivo eliminado
Practica recuperar archivo eliminadoPractica recuperar archivo eliminado
Practica recuperar archivo eliminado
Alex Toapanta
 
Taller segmentacion
Taller segmentacionTaller segmentacion
Taller segmentacion
Alex Toapanta
 
Taller principios analisis forense
Taller principios analisis forenseTaller principios analisis forense
Taller principios analisis forense
Alex Toapanta
 
Metodología de Análisis Forense
Metodología de Análisis ForenseMetodología de Análisis Forense
Metodología de Análisis Forense
Alex Toapanta
 
Practica 2 Procesamiento de imágenes con matlab
Practica 2 Procesamiento de imágenes con matlabPractica 2 Procesamiento de imágenes con matlab
Practica 2 Procesamiento de imágenes con matlab
Alex Toapanta
 
Taller n18: Perito Informático
Taller n18: Perito InformáticoTaller n18: Perito Informático
Taller n18: Perito Informático
Alex Toapanta
 
Imagenes con matlab
Imagenes con matlabImagenes con matlab
Imagenes con matlab
Alex Toapanta
 
Ciclos repetición matlab
Ciclos repetición matlabCiclos repetición matlab
Ciclos repetición matlab
Alex Toapanta
 
Practica5 matlab funciontes
Practica5 matlab funciontesPractica5 matlab funciontes
Practica5 matlab funciontes
Alex Toapanta
 
Graficas sencillas matlab
Graficas sencillas matlabGraficas sencillas matlab
Graficas sencillas matlab
Alex Toapanta
 
Practica3 matlab
Practica3 matlabPractica3 matlab
Practica3 matlab
Alex Toapanta
 
Practica 2 Matlab
Practica 2 MatlabPractica 2 Matlab
Practica 2 Matlab
Alex Toapanta
 
Firma electronica
Firma electronicaFirma electronica
Firma electronica
Alex Toapanta
 
Instalacion matlab
Instalacion matlabInstalacion matlab
Instalacion matlab
Alex Toapanta
 
La luz y el espectro electromagnetico
La luz y el espectro electromagneticoLa luz y el espectro electromagnetico
La luz y el espectro electromagnetico
Alex Toapanta
 
Fundamentos de la teoria del color
Fundamentos de la teoria del colorFundamentos de la teoria del color
Fundamentos de la teoria del color
Alex Toapanta
 

More from Alex Toapanta (20)

Practica pishing 2
Practica pishing 2Practica pishing 2
Practica pishing 2
 
Practica instalación maquinas virtuales en VMware
Practica instalación maquinas virtuales en VMwarePractica instalación maquinas virtuales en VMware
Practica instalación maquinas virtuales en VMware
 
Practica 3 Informática Legal
Practica 3 Informática LegalPractica 3 Informática Legal
Practica 3 Informática Legal
 
Practica nro 2 Informática Forense
Practica nro 2 Informática ForensePractica nro 2 Informática Forense
Practica nro 2 Informática Forense
 
Practica recuperar archivo eliminado
Practica recuperar archivo eliminadoPractica recuperar archivo eliminado
Practica recuperar archivo eliminado
 
Taller segmentacion
Taller segmentacionTaller segmentacion
Taller segmentacion
 
Taller principios analisis forense
Taller principios analisis forenseTaller principios analisis forense
Taller principios analisis forense
 
Metodología de Análisis Forense
Metodología de Análisis ForenseMetodología de Análisis Forense
Metodología de Análisis Forense
 
Practica 2 Procesamiento de imágenes con matlab
Practica 2 Procesamiento de imágenes con matlabPractica 2 Procesamiento de imágenes con matlab
Practica 2 Procesamiento de imágenes con matlab
 
Taller n18: Perito Informático
Taller n18: Perito InformáticoTaller n18: Perito Informático
Taller n18: Perito Informático
 
Imagenes con matlab
Imagenes con matlabImagenes con matlab
Imagenes con matlab
 
Ciclos repetición matlab
Ciclos repetición matlabCiclos repetición matlab
Ciclos repetición matlab
 
Practica5 matlab funciontes
Practica5 matlab funciontesPractica5 matlab funciontes
Practica5 matlab funciontes
 
Graficas sencillas matlab
Graficas sencillas matlabGraficas sencillas matlab
Graficas sencillas matlab
 
Practica3 matlab
Practica3 matlabPractica3 matlab
Practica3 matlab
 
Practica 2 Matlab
Practica 2 MatlabPractica 2 Matlab
Practica 2 Matlab
 
Firma electronica
Firma electronicaFirma electronica
Firma electronica
 
Instalacion matlab
Instalacion matlabInstalacion matlab
Instalacion matlab
 
La luz y el espectro electromagnetico
La luz y el espectro electromagneticoLa luz y el espectro electromagnetico
La luz y el espectro electromagnetico
 
Fundamentos de la teoria del color
Fundamentos de la teoria del colorFundamentos de la teoria del color
Fundamentos de la teoria del color
 

Recently uploaded

An improved modulation technique suitable for a three level flying capacitor ...
An improved modulation technique suitable for a three level flying capacitor ...An improved modulation technique suitable for a three level flying capacitor ...
An improved modulation technique suitable for a three level flying capacitor ...
IJECEIAES
 
Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...
bijceesjournal
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
Seminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptxSeminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptx
Madan Karki
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
AjmalKhan50578
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
UReason
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
Nada Hikmah
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
shadow0702a
 
Certificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi AhmedCertificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi Ahmed
Mahmoud Morsy
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
architagupta876
 
cnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classicationcnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classication
SakkaravarthiShanmug
 
integral complex analysis chapter 06 .pdf
integral complex analysis chapter 06 .pdfintegral complex analysis chapter 06 .pdf
integral complex analysis chapter 06 .pdf
gaafergoudaay7aga
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
LAXMAREDDY22
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
artificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptxartificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptx
GauravCar
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 

Recently uploaded (20)

An improved modulation technique suitable for a three level flying capacitor ...
An improved modulation technique suitable for a three level flying capacitor ...An improved modulation technique suitable for a three level flying capacitor ...
An improved modulation technique suitable for a three level flying capacitor ...
 
Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
Seminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptxSeminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptx
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
 
Certificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi AhmedCertificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi Ahmed
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
 
cnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classicationcnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classication
 
integral complex analysis chapter 06 .pdf
integral complex analysis chapter 06 .pdfintegral complex analysis chapter 06 .pdf
integral complex analysis chapter 06 .pdf
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
artificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptxartificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptx
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 

Instalación de emu8086

  • 1. Alex Jhonatan Toapanta Molina | Compiladores | 19 de abril de 2018 Informe de Instalación de Ensamblador EMU8086
  • 2. PÁGINA 1 INSTALACION DEL ENSAMBLADOR EMU8086
  • 6. PÁGINA 5 DECOMPILACION HOLAMUNDO .model small .stack .data saludo db "Hola mundo!!!n Alex Toapanta - PUCE-SI - Compiladores - 19/4/2018", "$"
  • 7. PÁGINA 6 .code main proc ;Inicia proceso mov ax,seg saludo ;hmm ¿seg? mov ds,ax ;ds = ax = saludo mov ah,09 ;Function(print string) lea dx,saludo ;DX = String terminated by "$" int 21h ;Interruptions DOS Functions ;mensaje en pantalla mov ax,4c00h ;Function (Quit with exit code (EXIT)) int 21h ;Interruption DOS Functions main endp ;Termina proceso end main
  • 8. PÁGINA 7 Compilar un programa que permita comparar 2 números del 0 al 9. name "calc-sum" org 100h ; directive make tiny com file. ; calculate the sum of elements in vector, ; store result in m and print it in binary code. ; number of elements: mov cx, 10 ; al will store the sum: mov al, 0 ; bx is an index:
  • 9. PÁGINA 8 mov bx, 0 ; sum elements: next: add al, vector[bx] ; next byte: inc bx ; loop until cx=0: loop next ; store result in m: mov m, al ; print result in binary: mov bl, m mov cx, 8 print: mov ah, 2 ; print function. Mov dl, '0' test bl, 10000000b ; test first bit. jz zero mov dl, '1' zero: int 21h shl bl, 1 loop print ; print binary suffix: mov dl, 'b' int 21h mov dl, 0ah ; new line. int 21h mov dl, 0dh ; carrige return. int 21h ; print result in decimal: mov al, m call print_al ; wait for any key press: mov ah, 0 int 16h ret ; variables: vector db 5, 4, 5, 2, 1, 9, 1, 2, 5, 7 m db 0 print_al proc cmp al, 0 jne print_al_r push ax mov al, '0' mov ah, 0eh int 10h pop ax ret print_al_r: pusha mov ah, 0 cmp ax, 0 je pn_done mov dl, 10 div dl
  • 10. PÁGINA 9 call print_al_r mov al, ah add al, 30h mov ah, 0eh int 10h jmp pn_done pn_done: popa ret endp COMPILAR UN PROGRAMA QUE PERMITA SUMAR 10 VALORES ASIGNADOS EN UN VECTOR
  • 11. PÁGINA 10 name "calc-sum" org 100h ; directive make tiny com file. ; calculate the sum of elements in vector, ; store result in m and print it in binary code. ; number of elements: mov cx, 10 ; al will store the sum: mov al, 0 ; bx is an index: mov bx, 0 ; sum elements: next: add al, vector[bx] ; next byte: inc bx ; loop until cx=0: loop next ; store result in m: mov m, al ; print result in binary: mov bl, m mov cx, 8 print: mov ah, 2 ; print function. Mov dl, '0' test bl, 10000000b ; test first bit. jz zero mov dl, '1' zero: int 21h shl bl, 1 loop print ; print binary suffix: mov dl, 'b' int 21h
  • 12. PÁGINA 11 mov dl, 0ah ; new line. int 21h mov dl, 0dh ; carrige return. int 21h ; print result in decimal: mov al, m call print_al ; wait for any key press: mov ah, 0 int 16h ret ; variables: vector db 5, 4, 5, 2, 1, 9, 1, 2, 5, 7 m db 0 print_al proc cmp al, 0 jne print_al_r push ax mov al, '0' mov ah, 0eh int 10h pop ax ret print_al_r: pusha mov ah, 0 cmp ax, 0 je pn_done mov dl, 10 div dl call print_al_r mov al, ah add al, 30h mov ah, 0eh int 10h jmp pn_done pn_done: popa ret endp
  • 13. PÁGINA 12 DECOMPILACION DE UN PROGRAMA ADICIONAL COMPARAR SI DOS CADENAS SON IGUALES org 100h comienzo:
  • 14. PÁGINA 13 mov si, x mov al, msg2[si] cmp msg[si], al ;comparar letra por letra las cadenas, si uno no coincide mand a directamente a fin y termina el programa jne fin: cmp msg[si], "$" ;si es el final y el programa llega aca, quiere decir que son iguales jz final: inc x loop comienzo final: mov dx, offset msg3 mov ah, 9 int 21h fin: ret msg db "hello world $" msg2 db "hello world $" msg3 db "Son iguales $" x dw 0