Código de Ensamblador - Escribir la letra X hasta que se presione ESC

20130520

Publicado el 29 de Diciembre del 2019gráfica de visualizaciones de la versión: 20130520
2.804 visualizaciones desde el 29 de Diciembre del 2019
estrellaestrellaestrellaestrellaestrella
estrellaestrellaestrellaestrella
estrellaestrellaestrella
estrellaestrella
estrella


Forma parte de Ejercicios resueltos en Ensamblador 8086
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name "keybrd"
org 100h
; print a welcome message:
mov dx, offset msg
mov ah, 9
int 21h
;============================
; eternal loop to get
; and print keys:
wait_for_key:
; check for keystroke in
; keyboard buffer:
mov dh, pos
 mov dl, pos
 mov bh, 0
 mov ah, 2
 int 10h ;Movemos el cursor
 mov al,'X'
 mov bh,0
 mov bl,1
 mov cx,1
 mov ah,09h
 inc pos ;Imprimimos una x
 int 10h
 mov ah, 1
 int 16h
 jz wait_for_key
; get keystroke from keyboard:
; (remove from the buffer)
mov ah, 0
int 16h
; print the key:
mov ah, 0eh
int 10h
; press 'esc' to exit:
cmp al, 1bh
jz exit
jmp wait_for_key
;============================
exit:
ret
msg db "Type anything...", 0Dh,0Ah
 db "[Enter] - carriage return.", 0Dh,0Ah
 db "[Ctrl]+[Enter] - line feed.", 0Dh,0Ah
 db "You may hear a beep", 0Dh,0Ah
 db " when buffer is overflown.", 0Dh,0Ah
 db "Press Esc to exit.", 0Dh,0Ah, "$"
pos db 1
end



Comentarios sobre la versión: 20130520 (0)


No hay comentarios
 

Comentar la versión: 20130520

Nombre
Correo (no se visualiza en la web)
Valoración
Comentarios...
CerrarCerrar
CerrarCerrar
Cerrar

Tienes que ser un usuario registrado para poder insertar imágenes, archivos y/o videos.

Puedes registrarte o validarte desde aquí.

Codigo
Negrita
Subrayado
Tachado
Cursiva
Insertar enlace
Imagen externa
Emoticon
Tabular
Centrar
Titulo
Linea
Disminuir
Aumentar
Vista preliminar
sonreir
dientes
lengua
guiño
enfadado
confundido
llorar
avergonzado
sorprendido
triste
sol
estrella
jarra
camara
taza de cafe
email
beso
bombilla
amor
mal
bien
Es necesario revisar y aceptar las políticas de privacidad

http://lwp-l.com/s5767