forked from NunoLima10/Assembly-emu8086-iniciante
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExibir Matriz e limpar.asm
97 lines (53 loc) · 1.08 KB
/
Exibir Matriz e limpar.asm
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
org 100h
.stack 64h
.data
MsgEspaco Db " Limpo $" ;texto "limpo" e opcional
.code
inicio:
Mov Cx,4Ah ;tamanho 7Ah-30h|ascii de [z]-[0]
Mov Bh,30h ;onde comecar [0]
Mov Bl,0h ;numero de caracteres na linha
Exibir:
Mov Dl, Bh ; caracter a exibir
Mov Ah,02h
Int 21h
Inc BH ;proximo caracter
Inc Bl ;numero de caracteres na linha +1
Cmp Bl,10h ;se for fim da linha entao ir a proxima linha
JNE NoFinal
Mov Ah,02h
Mov Dl,0Ah
Int 21h
Mov Dl,0Dh
Int 21h
Mov Bl,0h
NoFinal:
Loop Exibir
;limpar algum valor que esteja la
Mov Ax,0h
Mov Bx,0h
;colocar cursor no inico da pagina
Mov Ah,2h
Mov Dl,0h
Mov Dh,0h
Mov Bl,0h
Int 10h
Mov Cx, 5h ;numero de linhas a limpar
Mov Bl,0h ;linha limpada
Limpar:
Cmp bl,1h
Jne Seguir ;Nao limpou essa linha jne salta se nao e igual
;bp=1 ir a proxima linha
Mov Ah,02h
Mov Dl,0Ah
Int 21h
Mov Dl,0Dh
Int 21h
Seguir:
;limpando linha
Mov Bl,0h
Lea Dx,MsgEspaco
Mov Ah,09h
Int 21h
Inc Bl
Loop Limpar