EJERCICIO LENGUAJE ENSAMBLADOR
Publicado por carlos manotas (1 intervención) el 13/05/2018 19:03:22
Buenas tardes, alguien me podría ayudar diciendo que hace este programa del lenguaje ensamblador?
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
.model small
.386
.stack 64
.data
v1 dw 23,09,1991
maestro db ?
.code
inicio proc near
mov ax,@data
mov ds,ax
lea si, v1
mov ax,0
mov bx,0
mov cx,0
mov ax,[si]
add ax,[si+2]
add ax,[si+4]
ciclo:
cmp ax,1000
ja miles
cmp ax,100
ja cientos
cmp ax,10
ja decenas
call suma
jmp salir
miles:
inc bh
sub ax,1000
jmp ciclo
cientos:
inc bl
sub ax,100
jmp ciclo
decenas:
inc ch
sub ax,10
jmp ciclo
suma:
add al,bh
add al,bl
add al,ch
mov bx,0
mov cx,0
cmp al,10
ja ciclo
salir:
mov maestro,al
mov ax,4c00h
int 21h
inicio endp
end
Valora esta pregunta
0