SlideShare a Scribd company logo
1 of 8
Download to read offline
PONTIFICA UNIVERSIDAD CATOLICA DEL ECUADOR SEDE IBARRA
NOMBRE: MARCO ACOSTA
NIVEL: 5to “SISTEMAS”
FECHA: 15/04/2041
INSTALACION DE EMU8086
Damos clic en siguiente
Elegimos la ruta para instalar
Presionamos en instalar
EJEMPLO DE HOLA MUNDO
Código del Ejemplo
name "Hola Mundo"
org 100h
mov ax, 3 ; text mode 80x25, 16 colors, 8 pages (ah=0, al=3)
int 10h ; do it!
mov ax, 1003h
mov bx, 0
int 10h
mov ax, 0b800h
mov ds, ax
mov [02h], 'H'
mov [04h], 'O'
mov [06h], 'l'
mov [08h], 'a'
mov [0ah], ','
mov [0ch], 'M'
mov [0eh], 'u'
mov [10h], 'n'
mov [12h], 'd'
mov [14h], 'o'
mov [16h], '!'
mov [18h], '!'
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
mov ah, 0
int 16h
ret
EJEMPLO DATOS
CODIGO DEL EJEMPLO
name "Datos"
org 100h
mov ax, 3
int 10h
mov ax, 1003h
mov bx, 0
int 10h
mov ax, 0b800h
mov ds, ax
mov [02h], 'M'
mov [04h], 'a'
mov [06h], 'r'
mov [08h], 'c'
mov [0ah], 'o'
mov [0ch], 'A'
mov [0eh], 'c'
mov [10h], 'o'
mov [12h], 's'
mov [14h], 't'
mov [16h], 'a'
mov [18h], ','
mov [20h], 'P'
mov [22h], 'U'
mov [24h], 'C'
mov [26h], 'E'
mov [28h], 'S'
mov [30h], 'I'
mov [32h], ','
mov [34h], '1'
mov [36h], '5'
mov [38h], ','
mov [40h], '0'
mov [42h], '4'
mov [44h], ','
mov [46h], '2'
mov [48h], '0'
mov [50h], '1'
mov [52h], '4'
mov cx, 41
mov di, 03h
c: mov [di], 11101100b
add di, 2
loop c
mov ah, 0
int 16h
ret
EJEMPLO COMAPARACION DE UN NUMERO
CODIGO DEL EJEMPLO
name "Numero"
org 100h
mov ah, 4
mov al, 4
cmp ah, al
nop
mov ah, 4
mov al, 3
cmp ah, al
nop
mov ah, 1
mov al, -5
cmp ah, al
nop
mov ah, 1
mov al, 251
cmp ah, al
nop
mov ah, -3
mov al, -2
cmp ah, al
nop
mov ah, -2
mov al, -3
cmp ah, al
nop
mov ah, 255
mov al, 1
cmp ah, al
nop
game: mov dx, offset msg1
mov ah, 9
int 21h
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_7
jmp print
below: mov dx, offset below_7
jmp print
above: mov dx, offset above_7
print: mov ah, 9
int 21h
jmp game ; loop.
stop: ret ; stop
msg1 db "Introducir un numero $"
equal_7 db " Igual a 7", 0Dh,0Ah, "$"
below_7 db " Menor que 7" , 0Dh,0Ah, "$"
above_7 db " Mayor que 7" , 0Dh,0Ah, "$"
EJEMPLO SUMA DE 10 NUMEROS
Codigo del Ejemplo
name "Suma"
org 100h ; directive make tiny com file.
mov cx, 10
mov al, 0
mov bx, 0
next: add al, vector[bx]
inc bx
loop next
mov m, al
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
mov dl, 'b'
int 21h
mov dl, 0ah ; new line.
int 21h
mov dl, 0dh ; carrige return.
int 21h
mov al, m
call print_al
mov ah, 0
int 16h
ret
vector db 5, 4, 5, 2, 1, 2, 5, 7, 9, 1
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

Similar to PUCE IBARRA EMU8086 INSTALLATION

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
 
Compiladoresemulador
CompiladoresemuladorCompiladoresemulador
CompiladoresemuladorDavid Caicedo
 
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 EMU8086Jhon Alexito
 
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
 
Instalación de emu8086
Instalación de emu8086Instalación de emu8086
Instalación de emu8086Alex Toapanta
 
reductio [ad absurdum]
reductio [ad absurdum]reductio [ad absurdum]
reductio [ad absurdum]Shakacon
 
When Bad Things Come In Good Packages
When Bad Things Come In Good PackagesWhen Bad Things Come In Good Packages
When Bad Things Come In Good PackagesSaumil Shah
 
Joshua Wehner - Tomorrows Programming Languages Today
Joshua Wehner - Tomorrows Programming Languages TodayJoshua Wehner - Tomorrows Programming Languages Today
Joshua Wehner - Tomorrows Programming Languages TodayRefresh Events
 
Tecnicas avanzadas con CSS3
Tecnicas avanzadas con CSS3Tecnicas avanzadas con CSS3
Tecnicas avanzadas con CSS3Marta Armada
 

Similar to PUCE IBARRA EMU8086 INSTALLATION (16)

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
 
Compiladoresemulador
CompiladoresemuladorCompiladoresemulador
Compiladoresemulador
 
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
 
Algoritmos ensambladores
Algoritmos ensambladoresAlgoritmos ensambladores
Algoritmos ensambladores
 
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)
 
Emulador emu8086
Emulador emu8086Emulador emu8086
Emulador emu8086
 
Instalación de emu8086
Instalación de emu8086Instalación de emu8086
Instalación de emu8086
 
reductio [ad absurdum]
reductio [ad absurdum]reductio [ad absurdum]
reductio [ad absurdum]
 
8086 pgms
8086 pgms8086 pgms
8086 pgms
 
Taller Ensambladores
Taller EnsambladoresTaller Ensambladores
Taller Ensambladores
 
Lec06
Lec06Lec06
Lec06
 
When Bad Things Come In Good Packages
When Bad Things Come In Good PackagesWhen Bad Things Come In Good Packages
When Bad Things Come In Good Packages
 
Joshua Wehner - Tomorrows Programming Languages Today
Joshua Wehner - Tomorrows Programming Languages TodayJoshua Wehner - Tomorrows Programming Languages Today
Joshua Wehner - Tomorrows Programming Languages Today
 
Tecnicas avanzadas con CSS3
Tecnicas avanzadas con CSS3Tecnicas avanzadas con CSS3
Tecnicas avanzadas con CSS3
 

More from PUCESI

Scriptcase
ScriptcaseScriptcase
ScriptcasePUCESI
 
Flex bison marco_acosta
Flex bison marco_acostaFlex bison marco_acosta
Flex bison marco_acostaPUCESI
 
Python Ejercicios
Python EjerciciosPython Ejercicios
Python EjerciciosPUCESI
 
Analizador sintactico
Analizador sintacticoAnalizador sintactico
Analizador sintacticoPUCESI
 
Marco decompilador
Marco decompiladorMarco decompilador
Marco decompiladorPUCESI
 
Desventajas
DesventajasDesventajas
DesventajasPUCESI
 

More from PUCESI (6)

Scriptcase
ScriptcaseScriptcase
Scriptcase
 
Flex bison marco_acosta
Flex bison marco_acostaFlex bison marco_acosta
Flex bison marco_acosta
 
Python Ejercicios
Python EjerciciosPython Ejercicios
Python Ejercicios
 
Analizador sintactico
Analizador sintacticoAnalizador sintactico
Analizador sintactico
 
Marco decompilador
Marco decompiladorMarco decompilador
Marco decompilador
 
Desventajas
DesventajasDesventajas
Desventajas
 

Recently uploaded

Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
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
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(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
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
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
 
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
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 

Recently uploaded (20)

Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
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
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk 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...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
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...
 
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
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 

PUCE IBARRA EMU8086 INSTALLATION

  • 1. PONTIFICA UNIVERSIDAD CATOLICA DEL ECUADOR SEDE IBARRA NOMBRE: MARCO ACOSTA NIVEL: 5to “SISTEMAS” FECHA: 15/04/2041 INSTALACION DE EMU8086 Damos clic en siguiente
  • 2. Elegimos la ruta para instalar Presionamos en instalar EJEMPLO DE HOLA MUNDO
  • 3. Código del Ejemplo name "Hola Mundo" org 100h mov ax, 3 ; text mode 80x25, 16 colors, 8 pages (ah=0, al=3) int 10h ; do it! mov ax, 1003h mov bx, 0 int 10h mov ax, 0b800h mov ds, ax mov [02h], 'H' mov [04h], 'O' mov [06h], 'l' mov [08h], 'a' mov [0ah], ',' mov [0ch], 'M' mov [0eh], 'u' mov [10h], 'n' mov [12h], 'd' mov [14h], 'o' mov [16h], '!' mov [18h], '!' 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 mov ah, 0 int 16h ret
  • 4. EJEMPLO DATOS CODIGO DEL EJEMPLO name "Datos" org 100h mov ax, 3 int 10h mov ax, 1003h mov bx, 0 int 10h mov ax, 0b800h mov ds, ax mov [02h], 'M' mov [04h], 'a' mov [06h], 'r' mov [08h], 'c' mov [0ah], 'o' mov [0ch], 'A' mov [0eh], 'c' mov [10h], 'o' mov [12h], 's' mov [14h], 't' mov [16h], 'a' mov [18h], ',' mov [20h], 'P' mov [22h], 'U' mov [24h], 'C' mov [26h], 'E' mov [28h], 'S'
  • 5. mov [30h], 'I' mov [32h], ',' mov [34h], '1' mov [36h], '5' mov [38h], ',' mov [40h], '0' mov [42h], '4' mov [44h], ',' mov [46h], '2' mov [48h], '0' mov [50h], '1' mov [52h], '4' mov cx, 41 mov di, 03h c: mov [di], 11101100b add di, 2 loop c mov ah, 0 int 16h ret EJEMPLO COMAPARACION DE UN NUMERO CODIGO DEL EJEMPLO name "Numero" org 100h mov ah, 4 mov al, 4 cmp ah, al nop
  • 6. mov ah, 4 mov al, 3 cmp ah, al nop mov ah, 1 mov al, -5 cmp ah, al nop mov ah, 1 mov al, 251 cmp ah, al nop mov ah, -3 mov al, -2 cmp ah, al nop mov ah, -2 mov al, -3 cmp ah, al nop mov ah, 255 mov al, 1 cmp ah, al nop game: mov dx, offset msg1 mov ah, 9 int 21h 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_7 jmp print below: mov dx, offset below_7 jmp print above: mov dx, offset above_7 print: mov ah, 9 int 21h jmp game ; loop.
  • 7. stop: ret ; stop msg1 db "Introducir un numero $" equal_7 db " Igual a 7", 0Dh,0Ah, "$" below_7 db " Menor que 7" , 0Dh,0Ah, "$" above_7 db " Mayor que 7" , 0Dh,0Ah, "$" EJEMPLO SUMA DE 10 NUMEROS Codigo del Ejemplo name "Suma" org 100h ; directive make tiny com file. mov cx, 10 mov al, 0 mov bx, 0 next: add al, vector[bx] inc bx loop next mov m, al 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
  • 8. mov dl, 'b' int 21h mov dl, 0ah ; new line. int 21h mov dl, 0dh ; carrige return. int 21h mov al, m call print_al mov ah, 0 int 16h ret vector db 5, 4, 5, 2, 1, 2, 5, 7, 9, 1 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