SlideShare a Scribd company logo
1 of 17
Download to read offline
Tarea en Clase de Compiladores
Nombre: Alexander Echeverría
Nivel: 5to Sistema
Fecha: 15-04-2014
Ejecutamos el ensamblador
Instalamos el ensamblador
Terminamos la Instalación
Emu8086
El Emulador EMU8086 es el primer programa que se utiliza en el curso de Microprocesadores que
imparte la Universidad Don Bosco; se ha elegido este emulador porque posee una interfaz de
usuario muy amistosa que permite familiarizarse con los fundamentos de la programación en
lenguaje ensamblador de forma muy intuitiva, aparte de eso brinda una serie de recursos para
ejecutar y depurar los programas
Al ejecutar el programa Hola Mundo nos sale en Ingles y con una serie de cambios en el código
lo cambiamos a español
Código del Ejemplo 1
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], 'H'
mov [04h], 'o'
mov [06h], 'l'
mov [08h], 'a'
mov [0ah], ' '
mov [0ch], ','
mov [0eh], 'M'
mov [10h], 'u'
mov [12h], 'n'
mov [14h], 'd'
mov [16h], 'o'
mov [18h], '!'
; 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
Ejemplo 2: Nombre completo del estudiante, Universidad, fecha y materia.
Código del ejercicio 2
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], 'A'
mov [04h], 'l'
mov [06h], 'e'
mov [08h], 'x'
mov [0ah], 'E'
mov [0ch], 'c'
mov [0eh], 'h'
mov [10h], 'e'
mov [12h], 'v'
mov [14h], 'e'
mov [16h], 'r'
mov [18h], 'r'
mov [1ah], 'i'
mov [1ch], 'a'
mov [1eh], ','
mov [20h], ' '
mov [22h], 'P'
mov [24h], 'u'
mov [26h], 'c'
mov [28h], 'e'
mov [2ah], 's'
mov [2ch], 'i'
mov [2eh], ','
mov [30h], '1'
mov [32h], '5'
mov [34h], '-'
mov [36h], '0'
mov [38h], '4'
mov [3ah], '-'
mov [3ch], '2'
mov [3eh], '0'
mov [40h], '1'
mov [42h], '4'
mov [46h], ','
mov [48h], ' '
mov [4ah], 'C'
mov [4ch], 'o'
mov [4eh], 'm'
mov [50h], 'p'
mov [52h], 'i'
mov [54h], 'l'
mov [56h], 'a'
mov [58h], 'd'
mov [5ah], 'o'
mov [5ch], 'r'
mov [5eh], 'e'
mov [60h], '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
Ejercicio 3 Comparación de numero con el 7
Código del ejercicio 3
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, '7'
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 " es siete! (igual)", 0Dh,0Ah, "$"
below_5 db " es menor siete!" , 0Dh,0Ah, "$"
above_5 db " es mayor siete!" , 0Dh,0Ah, "$"
Ejercicio 4 Suma de 10 números
Código del Ejercicio 4
mov ah, 0
int 16h
ret
; variables:
vector db 5, 4, 5, 2, 1, 3, 4, 6, 1, 2,
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
Ensamblador emu 8086

More Related Content

What's hot

Colisiones dominios de colisión y segmentación
Colisiones dominios de colisión y segmentaciónColisiones dominios de colisión y segmentación
Colisiones dominios de colisión y segmentaciónBetty Ayllon
 
Unidad 2 ensamblador
Unidad 2   ensambladorUnidad 2   ensamblador
Unidad 2 ensambladoreveTalavera
 
Chaotic cryptography and multimedia security
Chaotic cryptography and multimedia securityChaotic cryptography and multimedia security
Chaotic cryptography and multimedia securityFatima Azeez
 
Algoritmos DEKKER y PETERSON
Algoritmos DEKKER y PETERSONAlgoritmos DEKKER y PETERSON
Algoritmos DEKKER y PETERSONPANAFMX
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithmsJames Wong
 
DES-lecture (1).ppt
DES-lecture (1).pptDES-lecture (1).ppt
DES-lecture (1).pptMrsPrabhaBV
 
Lenguaje ensamblador del microprocesador
Lenguaje ensamblador del microprocesadorLenguaje ensamblador del microprocesador
Lenguaje ensamblador del microprocesadorsmfch
 
Protocolos de cada capa del modelo osi
Protocolos de cada capa del modelo osiProtocolos de cada capa del modelo osi
Protocolos de cada capa del modelo osiWilfredo Matheu
 
I mage encryption using rc5
I mage encryption using rc5I mage encryption using rc5
I mage encryption using rc5Suramrit Singh
 
Automata Finito No Determinista
Automata Finito No DeterministaAutomata Finito No Determinista
Automata Finito No DeterministaJean Bernard
 
An introduction to X.509 certificates
An introduction to X.509 certificatesAn introduction to X.509 certificates
An introduction to X.509 certificatesStephane Potier
 

What's hot (20)

SSL
SSLSSL
SSL
 
Repeticion Selectiva (SR)
Repeticion Selectiva (SR)Repeticion Selectiva (SR)
Repeticion Selectiva (SR)
 
Colisiones dominios de colisión y segmentación
Colisiones dominios de colisión y segmentaciónColisiones dominios de colisión y segmentación
Colisiones dominios de colisión y segmentación
 
Ch02...1
Ch02...1Ch02...1
Ch02...1
 
Cryptography and Network Security William Stallings Lawrie Brown
Cryptography and Network Security William Stallings Lawrie BrownCryptography and Network Security William Stallings Lawrie Brown
Cryptography and Network Security William Stallings Lawrie Brown
 
Unidad 2 ensamblador
Unidad 2   ensambladorUnidad 2   ensamblador
Unidad 2 ensamblador
 
Chaotic cryptography and multimedia security
Chaotic cryptography and multimedia securityChaotic cryptography and multimedia security
Chaotic cryptography and multimedia security
 
Lenguaje y automata operaciones con lenguajes
Lenguaje y automata operaciones con lenguajesLenguaje y automata operaciones con lenguajes
Lenguaje y automata operaciones con lenguajes
 
Algoritmos DEKKER y PETERSON
Algoritmos DEKKER y PETERSONAlgoritmos DEKKER y PETERSON
Algoritmos DEKKER y PETERSON
 
Spanning tree protocol
Spanning tree protocolSpanning tree protocol
Spanning tree protocol
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
 
Protocolo de capa 5
Protocolo de capa 5Protocolo de capa 5
Protocolo de capa 5
 
DES-lecture (1).ppt
DES-lecture (1).pptDES-lecture (1).ppt
DES-lecture (1).ppt
 
Lenguaje ensamblador del microprocesador
Lenguaje ensamblador del microprocesadorLenguaje ensamblador del microprocesador
Lenguaje ensamblador del microprocesador
 
Protocolos de cada capa del modelo osi
Protocolos de cada capa del modelo osiProtocolos de cada capa del modelo osi
Protocolos de cada capa del modelo osi
 
Criptografia moderna
Criptografia modernaCriptografia moderna
Criptografia moderna
 
I mage encryption using rc5
I mage encryption using rc5I mage encryption using rc5
I mage encryption using rc5
 
Message digest 5
Message digest 5Message digest 5
Message digest 5
 
Automata Finito No Determinista
Automata Finito No DeterministaAutomata Finito No Determinista
Automata Finito No Determinista
 
An introduction to X.509 certificates
An introduction to X.509 certificatesAn introduction to X.509 certificates
An introduction to X.509 certificates
 

Similar to Ensamblador emu 8086

Instalación de emu8086 y compilados
Instalación de emu8086 y compiladosInstalación de emu8086 y compilados
Instalación de emu8086 y compiladosDiego Erazo
 
Emulador de ensamblador emu8086
Emulador de ensamblador emu8086Emulador de ensamblador emu8086
Emulador de ensamblador emu8086Marco Muñoz
 
Lenguaje ensamblador EMU8086
Lenguaje ensamblador EMU8086Lenguaje ensamblador EMU8086
Lenguaje ensamblador EMU8086Santy Bolo
 
Emuladores
EmuladoresEmuladores
EmuladoresBayoch
 
Taller practico emu8086_galarraga
Taller practico emu8086_galarragaTaller practico emu8086_galarraga
Taller practico emu8086_galarragaFabricio Galárraga
 
Marco acosta emu
Marco acosta emuMarco acosta emu
Marco acosta emuPUCESI
 
Compiladoresemulador
CompiladoresemuladorCompiladoresemulador
CompiladoresemuladorDavid Caicedo
 
Emulador de ensamblador EMU8086
Emulador de ensamblador EMU8086Emulador de ensamblador EMU8086
Emulador de ensamblador EMU8086Jhon Alexito
 
Chapter 6 Flow control Instructions
Chapter 6 Flow control InstructionsChapter 6 Flow control Instructions
Chapter 6 Flow control Instructionswarda aziz
 
Assembly language
Assembly languageAssembly language
Assembly languagebryle12
 
Handling character display in graphics mode using bios
Handling character display in graphics mode using biosHandling character display in graphics mode using bios
Handling character display in graphics mode using biosSyed Owais Ali Chishti
 
Software to the slaughter
Software to the slaughterSoftware to the slaughter
Software to the slaughterQuinn Wilton
 
DEF CON 27 - SMEA - adventures in smart buttplug penetration testing
DEF CON 27 - SMEA - adventures in smart buttplug penetration testingDEF CON 27 - SMEA - adventures in smart buttplug penetration testing
DEF CON 27 - SMEA - adventures in smart buttplug penetration testingFelipe Prado
 

Similar to Ensamblador emu 8086 (20)

Instalación de emu8086 y compilados
Instalación de emu8086 y compiladosInstalación de emu8086 y compilados
Instalación de emu8086 y compilados
 
Emulador de ensamblador emu8086
Emulador de ensamblador emu8086Emulador de ensamblador emu8086
Emulador de ensamblador emu8086
 
Lenguaje ensamblador EMU8086
Lenguaje ensamblador EMU8086Lenguaje ensamblador EMU8086
Lenguaje ensamblador EMU8086
 
Emuladores
EmuladoresEmuladores
Emuladores
 
Compiladores emu8086
Compiladores emu8086Compiladores emu8086
Compiladores emu8086
 
Taller practico emu8086_galarraga
Taller practico emu8086_galarragaTaller practico emu8086_galarraga
Taller practico emu8086_galarraga
 
Emulador emu8086
Emulador emu8086Emulador emu8086
Emulador emu8086
 
Marco acosta emu
Marco acosta emuMarco acosta emu
Marco acosta emu
 
Compiladoresemulador
CompiladoresemuladorCompiladoresemulador
Compiladoresemulador
 
Emulador de ensamblador EMU8086
Emulador de ensamblador EMU8086Emulador de ensamblador EMU8086
Emulador de ensamblador EMU8086
 
Assembler
AssemblerAssembler
Assembler
 
Chapter 6 Flow control Instructions
Chapter 6 Flow control InstructionsChapter 6 Flow control Instructions
Chapter 6 Flow control Instructions
 
Assembly language
Assembly languageAssembly language
Assembly language
 
Handling character display in graphics mode using bios
Handling character display in graphics mode using biosHandling character display in graphics mode using bios
Handling character display in graphics mode using bios
 
Lec06
Lec06Lec06
Lec06
 
Taller Ensambladores
Taller EnsambladoresTaller Ensambladores
Taller Ensambladores
 
Algoritmos ensambladores
Algoritmos ensambladoresAlgoritmos ensambladores
Algoritmos ensambladores
 
Software to the slaughter
Software to the slaughterSoftware to the slaughter
Software to the slaughter
 
DEF CON 27 - SMEA - adventures in smart buttplug penetration testing
DEF CON 27 - SMEA - adventures in smart buttplug penetration testingDEF CON 27 - SMEA - adventures in smart buttplug penetration testing
DEF CON 27 - SMEA - adventures in smart buttplug penetration testing
 
Cracking for beginners - copy (2)
Cracking for beginners - copy (2)Cracking for beginners - copy (2)
Cracking for beginners - copy (2)
 

Recently uploaded

(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Recently uploaded (20)

(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 

Ensamblador emu 8086

  • 1. Tarea en Clase de Compiladores Nombre: Alexander Echeverría Nivel: 5to Sistema Fecha: 15-04-2014 Ejecutamos el ensamblador Instalamos el ensamblador
  • 2. Terminamos la Instalación Emu8086 El Emulador EMU8086 es el primer programa que se utiliza en el curso de Microprocesadores que imparte la Universidad Don Bosco; se ha elegido este emulador porque posee una interfaz de usuario muy amistosa que permite familiarizarse con los fundamentos de la programación en lenguaje ensamblador de forma muy intuitiva, aparte de eso brinda una serie de recursos para ejecutar y depurar los programas Al ejecutar el programa Hola Mundo nos sale en Ingles y con una serie de cambios en el código lo cambiamos a español
  • 3. Código del Ejemplo 1 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
  • 4. ; 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
  • 5. ; print "hello world" ; first byte is ascii code, second byte is color code. mov [02h], 'H' mov [04h], 'o' mov [06h], 'l' mov [08h], 'a' mov [0ah], ' ' mov [0ch], ',' mov [0eh], 'M' mov [10h], 'u' mov [12h], 'n' mov [14h], 'd' mov [16h], 'o'
  • 6. mov [18h], '!' ; 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 Ejemplo 2: Nombre completo del estudiante, Universidad, fecha y materia.
  • 7. Código del ejercicio 2 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
  • 8. ; 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], 'A' mov [04h], 'l' mov [06h], 'e' mov [08h], 'x' mov [0ah], 'E' mov [0ch], 'c' mov [0eh], 'h' mov [10h], 'e' mov [12h], 'v' mov [14h], 'e'
  • 9. mov [16h], 'r' mov [18h], 'r' mov [1ah], 'i' mov [1ch], 'a' mov [1eh], ',' mov [20h], ' ' mov [22h], 'P' mov [24h], 'u' mov [26h], 'c' mov [28h], 'e' mov [2ah], 's' mov [2ch], 'i' mov [2eh], ',' mov [30h], '1' mov [32h], '5' mov [34h], '-' mov [36h], '0' mov [38h], '4' mov [3ah], '-' mov [3ch], '2' mov [3eh], '0' mov [40h], '1' mov [42h], '4' mov [46h], ',' mov [48h], ' '
  • 10. mov [4ah], 'C' mov [4ch], 'o' mov [4eh], 'm' mov [50h], 'p' mov [52h], 'i' mov [54h], 'l' mov [56h], 'a' mov [58h], 'd' mov [5ah], 'o' mov [5ch], 'r' mov [5eh], 'e' mov [60h], '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
  • 11. Ejercicio 3 Comparación de numero con el 7 Código del ejercicio 3 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
  • 12. 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
  • 13. 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
  • 14. int 21h ; read character in al: mov ah, 1 int 21h cmp al, '0' jb stop cmp al, '9' ja stop cmp al, '7' 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
  • 15. msg1 db "enter a number or any other character to exit: $" equal_5 db " es siete! (igual)", 0Dh,0Ah, "$" below_5 db " es menor siete!" , 0Dh,0Ah, "$" above_5 db " es mayor siete!" , 0Dh,0Ah, "$" Ejercicio 4 Suma de 10 números Código del Ejercicio 4 mov ah, 0 int 16h ret ; variables: vector db 5, 4, 5, 2, 1, 3, 4, 6, 1, 2, m db 0
  • 16. 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