SlideShare a Scribd company logo
1 of 10
Download to read offline
PONTIFICIA UNIVERSISDAD CATOLICA DEL ECUADOR SEDE IBARRA
PUCE-SI
NOMBRE: Bolívar Navarrete
NIVEL: Quinto
PROGRAMA EMU8086
Este programa es sumamente útil para aquellos que quieran aprender lenguaje
ensamblador (Assembler), ya que incorpora un editor avanzado, un ensamblador, una
PC virtual y tutoriales paso a paso. De esta manera, es posible ejecutar código fuente
sobre un emulador 8086, siendo el código de máquina totalmente compatible con las
generaciones siguientes de microprocesadores Intel.
Examples:
Hola mundo español.
Nombre completo del estudiante, Universidad, Fecha y materia.
; The easiest way to print out "Hello, World!"
name "hi"
org 100h
jmp start ; jump over data declaration
msg: db "Hello, World!", 0Dh,0Ah, 24h
start: mov dx, msg ; load offset of msg into dx.
mov ah, 09h ; print function is 9.
int 21h ; do it!
mov ah, 0
int 16h ; wait for any key....
ret ; return to operating system.
Comparación de números
name "flags"
org 100h
; this sample shows how cmp instruction sets the flags.
; usually cmp instruction is followed by any relative
; jump instruction such as: je, ja, jl, jae...
; it is recommended to click "flags" and "analyze"
; for better visual expirience before stepping through this code.
; (signed/unsigned)
; 4 is equal to 4
mov ah, 4
mov al, 4
cmp ah, al
nop
; (signed/unsigned)
; 4 is above and greater then 3
mov ah, 4
mov al, 3
cmp ah, al
nop
; -5 = 251 = 0fbh
; (signed)
; 1 is greater then -5
mov ah, 1
mov al, -5
cmp ah, al
nop
; (unsigned)
; 1 is below 251
mov ah, 1
mov al, 251
cmp ah, al
nop
; (signed)
; -3 is less then -2
mov ah, -3
mov al, -2
cmp ah, al
nop
; (signed)
; -2 is greater then -3
mov ah, -2
mov al, -3
cmp ah, al
nop
; (unsigned)
; 255 is above 1
mov ah, 255
mov al, 1
cmp ah, al
nop
; now a little game:
game: mov dx, offset msg1
mov ah, 9
int 21h
; read character in al:
mov ah, 1
int 21h
cmp al, '0'
jb stop
cmp al, '9'
ja stop
cmp al, '5'
jb below
ja above
mov dx, offset equal_5
jmp print
below: mov dx, offset below_5
jmp print
above: mov dx, offset above_5
print: mov ah, 9
int 21h
jmp game ; loop.
stop: ret ; stop
msg1 db "enter a number or any other character to exit: $"
equal_5 db " is five! (equal)", 0Dh,0Ah, "$"
below_5 db " is below five!" , 0Dh,0Ah, "$"
above_5 db " is above five!" , 0Dh,0Ah, "$"
Suma de 10 valores en un vector
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
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 6, 4, 5, 2, 1, 3, 0, 9, 8, 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

More Related Content

What's hot

Laboratorio de Microcomputadoras - Práctica 06
 Laboratorio de Microcomputadoras - Práctica 06 Laboratorio de Microcomputadoras - Práctica 06
Laboratorio de Microcomputadoras - Práctica 06Cristian Ortiz Gómez
 
CCNA Advanced Switching
CCNA Advanced SwitchingCCNA Advanced Switching
CCNA Advanced SwitchingDsunte Wilson
 
BGP para ISPs con MikroTik RouterOS
BGP para ISPs con MikroTik RouterOSBGP para ISPs con MikroTik RouterOS
BGP para ISPs con MikroTik RouterOSProzcenter
 
RAM Source code and Test Bench
RAM Source code and Test BenchRAM Source code and Test Bench
RAM Source code and Test BenchRaj Mohan
 
Alta disponibilidad. El arte de eliminar puntos únicos de fallo
 Alta disponibilidad. El arte de eliminar puntos únicos de fallo Alta disponibilidad. El arte de eliminar puntos únicos de fallo
Alta disponibilidad. El arte de eliminar puntos únicos de falloNETGEAR Iberia
 
2.10b network layer services i pv4 - variable length subnetting
2.10b network layer services  i pv4 - variable length subnetting2.10b network layer services  i pv4 - variable length subnetting
2.10b network layer services i pv4 - variable length subnettingJAIGANESH SEKAR
 
Vlans (virtual local area networks)
Vlans (virtual local area networks)Vlans (virtual local area networks)
Vlans (virtual local area networks)Kanishk Raj
 
Chapter 16 : inter-vlan routing
Chapter 16 : inter-vlan routingChapter 16 : inter-vlan routing
Chapter 16 : inter-vlan routingteknetir
 
CCNAv5 - S2: Chapter 9 Access Control Lists
CCNAv5 - S2: Chapter 9 Access Control ListsCCNAv5 - S2: Chapter 9 Access Control Lists
CCNAv5 - S2: Chapter 9 Access Control ListsVuz Dở Hơi
 
Transaction Management
Transaction Management Transaction Management
Transaction Management Visakh V
 
WAN Technology : ATM - Forouzan
WAN Technology : ATM - ForouzanWAN Technology : ATM - Forouzan
WAN Technology : ATM - ForouzanPradnya Saval
 
Overview of Spanning Tree Protocol
Overview of Spanning Tree ProtocolOverview of Spanning Tree Protocol
Overview of Spanning Tree ProtocolArash Foroughi
 
Distance Vector Routing Protocols
Distance Vector Routing ProtocolsDistance Vector Routing Protocols
Distance Vector Routing ProtocolsKABILESH RAMAR
 
CCNA parte 3 y 4 español
CCNA parte 3 y 4 españolCCNA parte 3 y 4 español
CCNA parte 3 y 4 españolmperez89
 

What's hot (20)

Network Virtualization
Network Virtualization Network Virtualization
Network Virtualization
 
Laboratorio de Microcomputadoras - Práctica 06
 Laboratorio de Microcomputadoras - Práctica 06 Laboratorio de Microcomputadoras - Práctica 06
Laboratorio de Microcomputadoras - Práctica 06
 
CCNA Advanced Switching
CCNA Advanced SwitchingCCNA Advanced Switching
CCNA Advanced Switching
 
Cap2 mod3(sol)
Cap2 mod3(sol)Cap2 mod3(sol)
Cap2 mod3(sol)
 
VLAN
VLANVLAN
VLAN
 
BGP para ISPs con MikroTik RouterOS
BGP para ISPs con MikroTik RouterOSBGP para ISPs con MikroTik RouterOS
BGP para ISPs con MikroTik RouterOS
 
RAM Source code and Test Bench
RAM Source code and Test BenchRAM Source code and Test Bench
RAM Source code and Test Bench
 
Alta disponibilidad. El arte de eliminar puntos únicos de fallo
 Alta disponibilidad. El arte de eliminar puntos únicos de fallo Alta disponibilidad. El arte de eliminar puntos únicos de fallo
Alta disponibilidad. El arte de eliminar puntos únicos de fallo
 
2.10b network layer services i pv4 - variable length subnetting
2.10b network layer services  i pv4 - variable length subnetting2.10b network layer services  i pv4 - variable length subnetting
2.10b network layer services i pv4 - variable length subnetting
 
Vlans (virtual local area networks)
Vlans (virtual local area networks)Vlans (virtual local area networks)
Vlans (virtual local area networks)
 
Mips opcodes
Mips opcodesMips opcodes
Mips opcodes
 
Acl cisco
Acl ciscoAcl cisco
Acl cisco
 
Chapter 16 : inter-vlan routing
Chapter 16 : inter-vlan routingChapter 16 : inter-vlan routing
Chapter 16 : inter-vlan routing
 
CCNAv5 - S2: Chapter 9 Access Control Lists
CCNAv5 - S2: Chapter 9 Access Control ListsCCNAv5 - S2: Chapter 9 Access Control Lists
CCNAv5 - S2: Chapter 9 Access Control Lists
 
Transaction Management
Transaction Management Transaction Management
Transaction Management
 
WAN Technology : ATM - Forouzan
WAN Technology : ATM - ForouzanWAN Technology : ATM - Forouzan
WAN Technology : ATM - Forouzan
 
Overview of Spanning Tree Protocol
Overview of Spanning Tree ProtocolOverview of Spanning Tree Protocol
Overview of Spanning Tree Protocol
 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
 
Distance Vector Routing Protocols
Distance Vector Routing ProtocolsDistance Vector Routing Protocols
Distance Vector Routing Protocols
 
CCNA parte 3 y 4 español
CCNA parte 3 y 4 españolCCNA parte 3 y 4 español
CCNA parte 3 y 4 español
 

Viewers also liked

Emulador de ensamblador EMU8086
Emulador de ensamblador EMU8086Emulador de ensamblador EMU8086
Emulador de ensamblador EMU8086Jhon Alexito
 
Compiladoresemulador
CompiladoresemuladorCompiladoresemulador
CompiladoresemuladorDavid Caicedo
 
Funciones del lenguaje ensamblador
Funciones del lenguaje ensambladorFunciones del lenguaje ensamblador
Funciones del lenguaje ensambladorAna Velazquez
 
Tipos De Ensambladores
Tipos De EnsambladoresTipos De Ensambladores
Tipos De EnsambladoresSpiderHal
 
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
 
Lenguaje ensamblador basico
Lenguaje ensamblador basicoLenguaje ensamblador basico
Lenguaje ensamblador basicoGustavo Davila
 
Lenguaje Ensamblador
Lenguaje EnsambladorLenguaje Ensamblador
Lenguaje Ensambladoriagardea
 

Viewers also liked (11)

Ensamblador
EnsambladorEnsamblador
Ensamblador
 
Emulador de ensamblador EMU8086
Emulador de ensamblador EMU8086Emulador de ensamblador EMU8086
Emulador de ensamblador EMU8086
 
Compiladoresemulador
CompiladoresemuladorCompiladoresemulador
Compiladoresemulador
 
03.Programación en ensamblador
03.Programación en ensamblador03.Programación en ensamblador
03.Programación en ensamblador
 
Lenguaje ensamblador
Lenguaje ensambladorLenguaje ensamblador
Lenguaje ensamblador
 
Funciones del lenguaje ensamblador
Funciones del lenguaje ensambladorFunciones del lenguaje ensamblador
Funciones del lenguaje ensamblador
 
Tipos De Ensambladores
Tipos De EnsambladoresTipos De Ensambladores
Tipos De Ensambladores
 
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 ...
 
Lenguaje ensamblador basico
Lenguaje ensamblador basicoLenguaje ensamblador basico
Lenguaje ensamblador basico
 
Lenguaje Ensamblador
Lenguaje EnsambladorLenguaje Ensamblador
Lenguaje Ensamblador
 
Lenguaje Ensamblador
Lenguaje EnsambladorLenguaje Ensamblador
Lenguaje Ensamblador
 

Similar to Lenguaje ensamblador EMU8086

Instalación de emu8086 y compilados
Instalación de emu8086 y compiladosInstalación de emu8086 y compilados
Instalación de emu8086 y compiladosDiego Erazo
 
Taller practico emu8086_galarraga
Taller practico emu8086_galarragaTaller practico emu8086_galarraga
Taller practico emu8086_galarragaFabricio Galárraga
 
Emulador de ensamblador emu8086
Emulador de ensamblador emu8086Emulador de ensamblador emu8086
Emulador de ensamblador emu8086Marco Muñoz
 
Emuladores
EmuladoresEmuladores
EmuladoresBayoch
 
Instalación de emu8086
Instalación de emu8086Instalación de emu8086
Instalación de emu8086Alex Toapanta
 
Marco acosta emu
Marco acosta emuMarco acosta emu
Marco acosta emuPUCESI
 
Chapter 6 Flow control Instructions
Chapter 6 Flow control InstructionsChapter 6 Flow control Instructions
Chapter 6 Flow control Instructionswarda 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.pdfaromanets
 
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 instructionswarda aziz
 
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
 

Similar to Lenguaje ensamblador EMU8086 (20)

Instalación de emu8086 y compilados
Instalación de emu8086 y compiladosInstalación de emu8086 y compilados
Instalación de emu8086 y compilados
 
Taller practico emu8086_galarraga
Taller practico emu8086_galarragaTaller practico emu8086_galarraga
Taller practico emu8086_galarraga
 
Emulador de ensamblador emu8086
Emulador de ensamblador emu8086Emulador de ensamblador emu8086
Emulador de ensamblador emu8086
 
Compiladores emu8086
Compiladores emu8086Compiladores emu8086
Compiladores emu8086
 
Assembler
AssemblerAssembler
Assembler
 
Algoritmos ensambladores
Algoritmos ensambladoresAlgoritmos ensambladores
Algoritmos ensambladores
 
Ensamblador emu 8086
Ensamblador emu 8086Ensamblador emu 8086
Ensamblador emu 8086
 
Emulador emu8086
Emulador emu8086Emulador emu8086
Emulador emu8086
 
Emuladores
EmuladoresEmuladores
Emuladores
 
Instalación de emu8086
Instalación de emu8086Instalación de emu8086
Instalación de emu8086
 
Taller Ensambladores
Taller EnsambladoresTaller Ensambladores
Taller Ensambladores
 
Marco acosta emu
Marco acosta emuMarco acosta emu
Marco acosta emu
 
Chapter 6 Flow control Instructions
Chapter 6 Flow control InstructionsChapter 6 Flow control Instructions
Chapter 6 Flow control Instructions
 
Lec06
Lec06Lec06
Lec06
 
Lab report assembly
Lab report assemblyLab report assembly
Lab report assembly
 
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
 
[ASM]Lab5
[ASM]Lab5[ASM]Lab5
[ASM]Lab5
 
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
 
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)
 
Assembly language programs
Assembly language programsAssembly language programs
Assembly language programs
 

More from Santy Bolo

Programa Emu8086
Programa Emu8086Programa Emu8086
Programa Emu8086Santy Bolo
 
Ensambladores (assemblers)
Ensambladores (assemblers)Ensambladores (assemblers)
Ensambladores (assemblers)Santy Bolo
 
Depuradores (debuggers)
Depuradores (debuggers)Depuradores (debuggers)
Depuradores (debuggers)Santy Bolo
 
Introduccion Compiladores
Introduccion CompiladoresIntroduccion Compiladores
Introduccion CompiladoresSanty Bolo
 

More from Santy Bolo (7)

Python 2.7
Python 2.7Python 2.7
Python 2.7
 
Programa Emu8086
Programa Emu8086Programa Emu8086
Programa Emu8086
 
Compresores
CompresoresCompresores
Compresores
 
Doc1
Doc1Doc1
Doc1
 
Ensambladores (assemblers)
Ensambladores (assemblers)Ensambladores (assemblers)
Ensambladores (assemblers)
 
Depuradores (debuggers)
Depuradores (debuggers)Depuradores (debuggers)
Depuradores (debuggers)
 
Introduccion Compiladores
Introduccion CompiladoresIntroduccion Compiladores
Introduccion Compiladores
 

Recently uploaded

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
"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
 
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
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
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
 

Recently uploaded (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
"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
 
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)
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
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...
 

Lenguaje ensamblador EMU8086

  • 1. PONTIFICIA UNIVERSISDAD CATOLICA DEL ECUADOR SEDE IBARRA PUCE-SI NOMBRE: Bolívar Navarrete NIVEL: Quinto PROGRAMA EMU8086 Este programa es sumamente útil para aquellos que quieran aprender lenguaje ensamblador (Assembler), ya que incorpora un editor avanzado, un ensamblador, una PC virtual y tutoriales paso a paso. De esta manera, es posible ejecutar código fuente sobre un emulador 8086, siendo el código de máquina totalmente compatible con las generaciones siguientes de microprocesadores Intel.
  • 2.
  • 3.
  • 5. Hola mundo español. Nombre completo del estudiante, Universidad, Fecha y materia. ; The easiest way to print out "Hello, World!" name "hi" org 100h jmp start ; jump over data declaration msg: db "Hello, World!", 0Dh,0Ah, 24h start: mov dx, msg ; load offset of msg into dx. mov ah, 09h ; print function is 9. int 21h ; do it! mov ah, 0 int 16h ; wait for any key....
  • 6. ret ; return to operating system. Comparación de números name "flags" org 100h ; this sample shows how cmp instruction sets the flags. ; usually cmp instruction is followed by any relative ; jump instruction such as: je, ja, jl, jae... ; it is recommended to click "flags" and "analyze" ; for better visual expirience before stepping through this code. ; (signed/unsigned) ; 4 is equal to 4 mov ah, 4 mov al, 4
  • 7. cmp ah, al nop ; (signed/unsigned) ; 4 is above and greater then 3 mov ah, 4 mov al, 3 cmp ah, al nop ; -5 = 251 = 0fbh ; (signed) ; 1 is greater then -5 mov ah, 1 mov al, -5 cmp ah, al nop ; (unsigned) ; 1 is below 251 mov ah, 1 mov al, 251 cmp ah, al nop ; (signed) ; -3 is less then -2 mov ah, -3 mov al, -2 cmp ah, al nop ; (signed) ; -2 is greater then -3 mov ah, -2 mov al, -3 cmp ah, al nop ; (unsigned) ; 255 is above 1 mov ah, 255 mov al, 1 cmp ah, al nop ; now a little game: game: mov dx, offset msg1 mov ah, 9 int 21h ; read character in al: mov ah, 1 int 21h cmp al, '0' jb stop cmp al, '9' ja stop cmp al, '5' jb below
  • 8. ja above mov dx, offset equal_5 jmp print below: mov dx, offset below_5 jmp print above: mov dx, offset above_5 print: mov ah, 9 int 21h jmp game ; loop. stop: ret ; stop msg1 db "enter a number or any other character to exit: $" equal_5 db " is five! (equal)", 0Dh,0Ah, "$" below_5 db " is below five!" , 0Dh,0Ah, "$" above_5 db " is above five!" , 0Dh,0Ah, "$" Suma de 10 valores en un vector
  • 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: 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
  • 10. ; 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 6, 4, 5, 2, 1, 3, 0, 9, 8, 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