SlideShare a Scribd company logo
1 of 21
Download to read offline
Instalación de EMU8086
EMU8086
Posee una interfaz de usuario muy amistosa que permite familiarizarse con los fundamentos
de la programación en lenguaje ensamblador(assembler) de forma muy intuitiva, aparte de
eso brinda una serie de recursos para ejecutar y depurar los programas. También tiene algunas
desventajas como el de no soportar algunas de las interrupciones más interesantes que posee
el sistema operativo y tampoco puede acceder a los puertos físicos (reales), sino que los emula
usando otros programas que ya están incluidos en su respectiva carpeta.
http://assembler8086.blogspot.com/2012/10/ejercicios-en-emu-8086.html
Comprobada la forma de ejecución realizar los siguientes programas en base a los códigos
expuestos como ejemplos.
• Ejecutar el programa hola mundo, y debe cambiar los mensajes de pantalla al español.
Compilar un programa en EMU8086 que indique lo siguiente:
Compilar un programa en EMU8086 que indique lo siguiente: Nombre completo del
estudiante, Universidad, Fecha y materia
name "hi-world"
; this example prints out "hello world!"
; by writing directly to video memory.
; in vga memory: first byte is ascii character, byte that follows is character attribute.
; if you change the second byte, you can change the color of
; the character even after it is printed.
; character attribute is 8 bit value,
; high 4 bits set background color and low 4 bits set foreground color.
; hex bin color
;
; 0 0000 black
; 1 0001 blue
; 2 0010 green
; 3 0011 cyan
; 4 0100 red
; 5 0101 magenta
; 6 0110 brown
; 7 0111 light gray
; 8 1000 dark gray
; 9 1001 light blue
; a 1010 light green
; b 1011 light cyan
; c 1100 light red
; d 1101 light magenta
; e 1110 yellow
; f 1111 white
org 100h
; set video mode
mov ax, 3 ; text mode 80x25, 16 colors, 8 pages (ah=0, al=3)
int 10h ; do it!
; cancel blinking and enable all 16 colors:
mov ax, 1003h
mov bx, 0
int 10h
; set segment register:
mov ax, 0b800h
mov ds, ax
; print "hello world"
; first byte is ascii code, second byte is color code.
mov [02h], 'D'
mov [04h], 'i'
mov [06h], 'e'
mov [08h], 'g'
mov [0ah], 'o'
mov [0ch], ','
mov [0eh], 'E'
mov [10h], 'r'
mov [12h], 'a'
mov [14h], 'z'
mov [16h], 'o'
mov [18h], ','
mov [1ah], '1'
mov [1ch], '6'
mov [1eh], '/'
mov [22h], '3'
mov [24h], '/'
mov [26h], '1'
mov [28h], '9'
mov [2ah], '9'
mov [2ch], '5'
mov [2eh], '-'
mov [32h], 'P'
mov [34h], 'U'
mov [36h], 'C'
mov [38h], 'E'
mov [3ah], 'S'
mov [3ch], 'I'
mov [3eh], '-'
mov [42h], 'C'
mov [44h], 'o'
mov [46h], 'm'
mov [48h], 'p'
mov [4ah], 'i'
mov [4ch], 'l'
mov [4eh], 'a'
mov [52h], 'd'
mov [54h], 'o'
mov [56h], 'r'
mov [58h], 'e'
mov [5ah], 's'
; color all characters:
mov cx, 12 ; number of characters.
mov di, 03h ; start from byte after 'h'
c: mov [di], 11101100b ; light red(1100) on yellow(1110)
add di, 2 ; skip over next ascii code in vga memory.
loop c
; wait for any key press:
mov ah, 0
int 16h
ret
Compilar un programa que permita comparar 2 números del 0 al 9.
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, "$"
Compilar un programa que permita sumar 10 valores asignados a 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 4, 7, 8, 2, 1, 10, 9, 7, 22, 100
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
Compilar un programa sugerido por usted, como propuesta adicional.
name "hex-bin"
org 100h
; load binary value:
; (hex: 5h)
mov al, 00000101b
; load hex value:
mov bl, 0ah
; load octal value:
; (hex: 8h)
mov cl, 10o
; 5 + 10 = 15 (0fh)
add al, bl
; 15 - 8 = 7
sub al, cl
; print result in binary:
mov bl, al
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
; wait for any key press:
mov ah, 0
int 16h
ret

More Related Content

What's hot

Presentacion vim
Presentacion vimPresentacion vim
Presentacion vimIcalia Labs
 
Perl 5.10 on OSDC.tw 2009
Perl 5.10 on OSDC.tw 2009Perl 5.10 on OSDC.tw 2009
Perl 5.10 on OSDC.tw 2009scweng
 
Knee-deep in C++ s... code
Knee-deep in C++ s... codeKnee-deep in C++ s... code
Knee-deep in C++ s... codePVS-Studio
 
How To Beat An Advanced CrackMe
How To Beat An Advanced CrackMeHow To Beat An Advanced CrackMe
How To Beat An Advanced CrackMeSouhail Hammou
 
Sine Wave Generator with controllable frequency displayed on a seven segment ...
Sine Wave Generator with controllable frequency displayed on a seven segment ...Sine Wave Generator with controllable frequency displayed on a seven segment ...
Sine Wave Generator with controllable frequency displayed on a seven segment ...Karthik Rathinavel
 
JSUG - Scala Lightning Talk by Michael Greifeneder
JSUG - Scala Lightning Talk by Michael GreifenederJSUG - Scala Lightning Talk by Michael Greifeneder
JSUG - Scala Lightning Talk by Michael GreifenederChristoph Pickl
 
C++: The Cathedral and the Bizarre
C++: The Cathedral and the BizarreC++: The Cathedral and the Bizarre
C++: The Cathedral and the BizarrePete Goodliffe
 
Le wagon javascript for beginners - ARF
Le wagon   javascript for beginners - ARFLe wagon   javascript for beginners - ARF
Le wagon javascript for beginners - ARFAndré Ferrer
 
Exploit Development: EzServer Buffer Overflow oleh Tom Gregory
Exploit Development: EzServer Buffer Overflow oleh Tom GregoryExploit Development: EzServer Buffer Overflow oleh Tom Gregory
Exploit Development: EzServer Buffer Overflow oleh Tom Gregoryzakiakhmad
 
CyberLink LabelPrint 2.5 Exploitation Process
CyberLink LabelPrint 2.5 Exploitation ProcessCyberLink LabelPrint 2.5 Exploitation Process
CyberLink LabelPrint 2.5 Exploitation ProcessThomas Gregory
 
VI Editors
VI EditorsVI Editors
VI EditorsDeivanai
 
nltkExamples
nltkExamplesnltkExamples
nltkExamplesAnirudh
 

What's hot (19)

Presentacion vim
Presentacion vimPresentacion vim
Presentacion vim
 
Config
ConfigConfig
Config
 
Perl 5.10 on OSDC.tw 2009
Perl 5.10 on OSDC.tw 2009Perl 5.10 on OSDC.tw 2009
Perl 5.10 on OSDC.tw 2009
 
Logging in JavaScript - part-2
Logging in JavaScript - part-2Logging in JavaScript - part-2
Logging in JavaScript - part-2
 
Knee-deep in C++ s... code
Knee-deep in C++ s... codeKnee-deep in C++ s... code
Knee-deep in C++ s... code
 
Cracking for beginners - copy (2)
Cracking for beginners - copy (2)Cracking for beginners - copy (2)
Cracking for beginners - copy (2)
 
How To Beat An Advanced CrackMe
How To Beat An Advanced CrackMeHow To Beat An Advanced CrackMe
How To Beat An Advanced CrackMe
 
Functuon
FunctuonFunctuon
Functuon
 
Sine Wave Generator with controllable frequency displayed on a seven segment ...
Sine Wave Generator with controllable frequency displayed on a seven segment ...Sine Wave Generator with controllable frequency displayed on a seven segment ...
Sine Wave Generator with controllable frequency displayed on a seven segment ...
 
Useless Box
Useless BoxUseless Box
Useless Box
 
JSUG - Scala Lightning Talk by Michael Greifeneder
JSUG - Scala Lightning Talk by Michael GreifenederJSUG - Scala Lightning Talk by Michael Greifeneder
JSUG - Scala Lightning Talk by Michael Greifeneder
 
C++: The Cathedral and the Bizarre
C++: The Cathedral and the BizarreC++: The Cathedral and the Bizarre
C++: The Cathedral and the Bizarre
 
Le wagon javascript for beginners - ARF
Le wagon   javascript for beginners - ARFLe wagon   javascript for beginners - ARF
Le wagon javascript for beginners - ARF
 
Exploit Development: EzServer Buffer Overflow oleh Tom Gregory
Exploit Development: EzServer Buffer Overflow oleh Tom GregoryExploit Development: EzServer Buffer Overflow oleh Tom Gregory
Exploit Development: EzServer Buffer Overflow oleh Tom Gregory
 
CyberLink LabelPrint 2.5 Exploitation Process
CyberLink LabelPrint 2.5 Exploitation ProcessCyberLink LabelPrint 2.5 Exploitation Process
CyberLink LabelPrint 2.5 Exploitation Process
 
VI Editors
VI EditorsVI Editors
VI Editors
 
nltkExamples
nltkExamplesnltkExamples
nltkExamples
 
Telegram bots
Telegram botsTelegram bots
Telegram bots
 
Conditional Loops
Conditional LoopsConditional Loops
Conditional Loops
 

Similar to Instalación de emu8086 y compilados

Compiladoresemulador
CompiladoresemuladorCompiladoresemulador
CompiladoresemuladorDavid Caicedo
 
Taller practico emu8086_galarraga
Taller practico emu8086_galarragaTaller practico emu8086_galarraga
Taller practico emu8086_galarragaFabricio Galárraga
 
Instalación de emu8086
Instalación de emu8086Instalación de emu8086
Instalación de emu8086Alex Toapanta
 
Chapter 6 Flow control Instructions
Chapter 6 Flow control InstructionsChapter 6 Flow control Instructions
Chapter 6 Flow control Instructionswarda aziz
 
BOOTABLE OPERATING SYSTEM PPT
BOOTABLE OPERATING SYSTEM PPTBOOTABLE OPERATING SYSTEM PPT
BOOTABLE OPERATING SYSTEM PPTShahzeb Pirzada
 
Brief description of all the interupts
Brief description of all the interuptsBrief description of all the interupts
Brief description of all the interuptsSHREEHARI WADAWADAGI
 
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
 
Assembly language
Assembly languageAssembly language
Assembly languagebryle12
 
Loop instruction, controlling the flow of progam
Loop instruction, controlling the flow of progamLoop instruction, controlling the flow of progam
Loop instruction, controlling the flow of progamDr. Girish GS
 
Implementation - Sample Runs
Implementation - Sample RunsImplementation - Sample Runs
Implementation - Sample RunsAdwiteeya Agrawal
 
Introduction to 8088 microprocessor
Introduction to 8088 microprocessorIntroduction to 8088 microprocessor
Introduction to 8088 microprocessorDwight Sabio
 
Buy Embedded Systems Projects Online,Buy B tech Projects Online
Buy Embedded Systems Projects Online,Buy B tech Projects OnlineBuy Embedded Systems Projects Online,Buy B tech Projects Online
Buy Embedded Systems Projects Online,Buy B tech Projects OnlineTechnogroovy
 
Software to the slaughter
Software to the slaughterSoftware to the slaughter
Software to the slaughterQuinn Wilton
 
Keyboard interrupt
Keyboard interruptKeyboard interrupt
Keyboard interruptTech_MX
 

Similar to Instalación de emu8086 y compilados (20)

Compiladoresemulador
CompiladoresemuladorCompiladoresemulador
Compiladoresemulador
 
Taller practico emu8086_galarraga
Taller practico emu8086_galarragaTaller practico emu8086_galarraga
Taller practico emu8086_galarraga
 
Assembler
AssemblerAssembler
Assembler
 
Algoritmos ensambladores
Algoritmos ensambladoresAlgoritmos ensambladores
Algoritmos ensambladores
 
Instalación de emu8086
Instalación de emu8086Instalación de emu8086
Instalación de emu8086
 
Chapter 6 Flow control Instructions
Chapter 6 Flow control InstructionsChapter 6 Flow control Instructions
Chapter 6 Flow control Instructions
 
BOOTABLE OPERATING SYSTEM PPT
BOOTABLE OPERATING SYSTEM PPTBOOTABLE OPERATING SYSTEM PPT
BOOTABLE OPERATING SYSTEM PPT
 
Brief description of all the interupts
Brief description of all the interuptsBrief description of all the interupts
Brief description of all the interupts
 
Taller Ensambladores
Taller EnsambladoresTaller Ensambladores
Taller Ensambladores
 
Lec06
Lec06Lec06
Lec06
 
Lecture6
Lecture6Lecture6
Lecture6
 
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
 
Assembly language
Assembly languageAssembly language
Assembly language
 
Loop instruction, controlling the flow of progam
Loop instruction, controlling the flow of progamLoop instruction, controlling the flow of progam
Loop instruction, controlling the flow of progam
 
Implementation - Sample Runs
Implementation - Sample RunsImplementation - Sample Runs
Implementation - Sample Runs
 
Introduction to 8088 microprocessor
Introduction to 8088 microprocessorIntroduction to 8088 microprocessor
Introduction to 8088 microprocessor
 
Buy Embedded Systems Projects Online,Buy B tech Projects Online
Buy Embedded Systems Projects Online,Buy B tech Projects OnlineBuy Embedded Systems Projects Online,Buy B tech Projects Online
Buy Embedded Systems Projects Online,Buy B tech Projects Online
 
Rapport
RapportRapport
Rapport
 
Software to the slaughter
Software to the slaughterSoftware to the slaughter
Software to the slaughter
 
Keyboard interrupt
Keyboard interruptKeyboard interrupt
Keyboard interrupt
 

More from Diego Erazo

Manual de instalacion de ventsim
Manual de instalacion de ventsimManual de instalacion de ventsim
Manual de instalacion de ventsimDiego Erazo
 
Taller 5 factores elementos garantia simulacion
Taller 5 factores elementos garantia simulacionTaller 5 factores elementos garantia simulacion
Taller 5 factores elementos garantia simulacionDiego Erazo
 
Vetajas y desventajas de la simulacion
Vetajas y desventajas de la simulacionVetajas y desventajas de la simulacion
Vetajas y desventajas de la simulacionDiego Erazo
 
Sistemas complejos
Sistemas complejosSistemas complejos
Sistemas complejosDiego Erazo
 
Algoritmo codificador de huffman matlab
Algoritmo codificador de huffman matlabAlgoritmo codificador de huffman matlab
Algoritmo codificador de huffman matlabDiego Erazo
 
Algoritmo de entropia matlab
Algoritmo de entropia matlabAlgoritmo de entropia matlab
Algoritmo de entropia matlabDiego Erazo
 
La entropía y los sistemas abiertos
La entropía y los sistemas abiertosLa entropía y los sistemas abiertos
La entropía y los sistemas abiertosDiego Erazo
 
Leyes de la entropia
Leyes de la entropiaLeyes de la entropia
Leyes de la entropiaDiego Erazo
 
Manual de instalacion de vegas
Manual de instalacion de vegasManual de instalacion de vegas
Manual de instalacion de vegasDiego Erazo
 
Segmentación de imágenes con matlab
Segmentación de imágenes con matlabSegmentación de imágenes con matlab
Segmentación de imágenes con matlabDiego Erazo
 
Entropía vs neguentropia
Entropía vs neguentropiaEntropía vs neguentropia
Entropía vs neguentropiaDiego Erazo
 
Aplicaciones de la ingeniería en sistemas
Aplicaciones de la ingeniería en sistemasAplicaciones de la ingeniería en sistemas
Aplicaciones de la ingeniería en sistemasDiego Erazo
 
Operadores morfológicos de imágenes
Operadores morfológicos de imágenesOperadores morfológicos de imágenes
Operadores morfológicos de imágenesDiego Erazo
 
La ingenieria en sistemas bajo las tgs
La ingenieria en sistemas bajo las tgsLa ingenieria en sistemas bajo las tgs
La ingenieria en sistemas bajo las tgsDiego Erazo
 
Filtrado y realzado de imagenes con matlab
Filtrado y realzado de imagenes con matlabFiltrado y realzado de imagenes con matlab
Filtrado y realzado de imagenes con matlabDiego Erazo
 
Teoría de la decisión ejercicios criterios
Teoría de la decisión ejercicios criteriosTeoría de la decisión ejercicios criterios
Teoría de la decisión ejercicios criteriosDiego Erazo
 
Operaciones digitales con matlab
Operaciones digitales con matlabOperaciones digitales con matlab
Operaciones digitales con matlabDiego Erazo
 
Teoría de la decisión consulta criterios
Teoría de la decisión consulta criteriosTeoría de la decisión consulta criterios
Teoría de la decisión consulta criteriosDiego Erazo
 
Teoria de desicion
Teoria de desicionTeoria de desicion
Teoria de desicionDiego Erazo
 
Teoria de los juegos
Teoria de los juegosTeoria de los juegos
Teoria de los juegosDiego Erazo
 

More from Diego Erazo (20)

Manual de instalacion de ventsim
Manual de instalacion de ventsimManual de instalacion de ventsim
Manual de instalacion de ventsim
 
Taller 5 factores elementos garantia simulacion
Taller 5 factores elementos garantia simulacionTaller 5 factores elementos garantia simulacion
Taller 5 factores elementos garantia simulacion
 
Vetajas y desventajas de la simulacion
Vetajas y desventajas de la simulacionVetajas y desventajas de la simulacion
Vetajas y desventajas de la simulacion
 
Sistemas complejos
Sistemas complejosSistemas complejos
Sistemas complejos
 
Algoritmo codificador de huffman matlab
Algoritmo codificador de huffman matlabAlgoritmo codificador de huffman matlab
Algoritmo codificador de huffman matlab
 
Algoritmo de entropia matlab
Algoritmo de entropia matlabAlgoritmo de entropia matlab
Algoritmo de entropia matlab
 
La entropía y los sistemas abiertos
La entropía y los sistemas abiertosLa entropía y los sistemas abiertos
La entropía y los sistemas abiertos
 
Leyes de la entropia
Leyes de la entropiaLeyes de la entropia
Leyes de la entropia
 
Manual de instalacion de vegas
Manual de instalacion de vegasManual de instalacion de vegas
Manual de instalacion de vegas
 
Segmentación de imágenes con matlab
Segmentación de imágenes con matlabSegmentación de imágenes con matlab
Segmentación de imágenes con matlab
 
Entropía vs neguentropia
Entropía vs neguentropiaEntropía vs neguentropia
Entropía vs neguentropia
 
Aplicaciones de la ingeniería en sistemas
Aplicaciones de la ingeniería en sistemasAplicaciones de la ingeniería en sistemas
Aplicaciones de la ingeniería en sistemas
 
Operadores morfológicos de imágenes
Operadores morfológicos de imágenesOperadores morfológicos de imágenes
Operadores morfológicos de imágenes
 
La ingenieria en sistemas bajo las tgs
La ingenieria en sistemas bajo las tgsLa ingenieria en sistemas bajo las tgs
La ingenieria en sistemas bajo las tgs
 
Filtrado y realzado de imagenes con matlab
Filtrado y realzado de imagenes con matlabFiltrado y realzado de imagenes con matlab
Filtrado y realzado de imagenes con matlab
 
Teoría de la decisión ejercicios criterios
Teoría de la decisión ejercicios criteriosTeoría de la decisión ejercicios criterios
Teoría de la decisión ejercicios criterios
 
Operaciones digitales con matlab
Operaciones digitales con matlabOperaciones digitales con matlab
Operaciones digitales con matlab
 
Teoría de la decisión consulta criterios
Teoría de la decisión consulta criteriosTeoría de la decisión consulta criterios
Teoría de la decisión consulta criterios
 
Teoria de desicion
Teoria de desicionTeoria de desicion
Teoria de desicion
 
Teoria de los juegos
Teoria de los juegosTeoria de los juegos
Teoria de los juegos
 

Recently uploaded

“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 

Recently uploaded (20)

“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 

Instalación de emu8086 y compilados

  • 2.
  • 3.
  • 4. EMU8086 Posee una interfaz de usuario muy amistosa que permite familiarizarse con los fundamentos de la programación en lenguaje ensamblador(assembler) de forma muy intuitiva, aparte de eso brinda una serie de recursos para ejecutar y depurar los programas. También tiene algunas desventajas como el de no soportar algunas de las interrupciones más interesantes que posee el sistema operativo y tampoco puede acceder a los puertos físicos (reales), sino que los emula usando otros programas que ya están incluidos en su respectiva carpeta. http://assembler8086.blogspot.com/2012/10/ejercicios-en-emu-8086.html Comprobada la forma de ejecución realizar los siguientes programas en base a los códigos expuestos como ejemplos. • Ejecutar el programa hola mundo, y debe cambiar los mensajes de pantalla al español. Compilar un programa en EMU8086 que indique lo siguiente:
  • 5.
  • 6.
  • 7. Compilar un programa en EMU8086 que indique lo siguiente: Nombre completo del estudiante, Universidad, Fecha y materia name "hi-world" ; this example prints out "hello world!" ; by writing directly to video memory. ; in vga memory: first byte is ascii character, byte that follows is character attribute. ; if you change the second byte, you can change the color of ; the character even after it is printed. ; character attribute is 8 bit value, ; high 4 bits set background color and low 4 bits set foreground color. ; hex bin color ; ; 0 0000 black ; 1 0001 blue ; 2 0010 green ; 3 0011 cyan ; 4 0100 red ; 5 0101 magenta ; 6 0110 brown ; 7 0111 light gray ; 8 1000 dark gray ; 9 1001 light blue ; a 1010 light green ; b 1011 light cyan ; c 1100 light red ; d 1101 light magenta ; e 1110 yellow ; f 1111 white
  • 8. org 100h ; set video mode mov ax, 3 ; text mode 80x25, 16 colors, 8 pages (ah=0, al=3) int 10h ; do it! ; cancel blinking and enable all 16 colors: mov ax, 1003h mov bx, 0 int 10h ; set segment register: mov ax, 0b800h mov ds, ax ; print "hello world" ; first byte is ascii code, second byte is color code. mov [02h], 'D' mov [04h], 'i' mov [06h], 'e' mov [08h], 'g' mov [0ah], 'o'
  • 9. mov [0ch], ',' mov [0eh], 'E' mov [10h], 'r' mov [12h], 'a' mov [14h], 'z' mov [16h], 'o' mov [18h], ',' mov [1ah], '1' mov [1ch], '6' mov [1eh], '/' mov [22h], '3' mov [24h], '/' mov [26h], '1' mov [28h], '9' mov [2ah], '9' mov [2ch], '5'
  • 10. mov [2eh], '-' mov [32h], 'P' mov [34h], 'U' mov [36h], 'C' mov [38h], 'E' mov [3ah], 'S' mov [3ch], 'I' mov [3eh], '-' mov [42h], 'C' mov [44h], 'o' mov [46h], 'm' mov [48h], 'p' mov [4ah], 'i' mov [4ch], 'l' mov [4eh], 'a'
  • 11. mov [52h], 'd' mov [54h], 'o' mov [56h], 'r' mov [58h], 'e' mov [5ah], 's' ; color all characters: mov cx, 12 ; number of characters. mov di, 03h ; start from byte after 'h' c: mov [di], 11101100b ; light red(1100) on yellow(1110) add di, 2 ; skip over next ascii code in vga memory. loop c ; wait for any key press: mov ah, 0 int 16h ret
  • 12. Compilar un programa que permita comparar 2 números del 0 al 9. 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)
  • 13. ; 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
  • 14. 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
  • 15. 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, "$" Compilar un programa que permita sumar 10 valores asignados a un vector. name "calc-sum" org 100h ; directive make tiny com file.
  • 16. ; 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.
  • 17. 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
  • 18. ret ; variables: vector db 4, 7, 8, 2, 1, 10, 9, 7, 22, 100 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:
  • 19. popa ret endp Compilar un programa sugerido por usted, como propuesta adicional. name "hex-bin" org 100h ; load binary value:
  • 20. ; (hex: 5h) mov al, 00000101b ; load hex value: mov bl, 0ah ; load octal value: ; (hex: 8h) mov cl, 10o ; 5 + 10 = 15 (0fh) add al, bl ; 15 - 8 = 7 sub al, cl ; print result in binary: mov bl, al 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:
  • 21. mov dl, 'b' int 21h ; wait for any key press: mov ah, 0 int 16h ret