
error memoria
Publicado por ANGEL (3 intervenciones) el 27/06/2016 18:20:22
Hola buenas tardes espero me puedan ayudar me dejaron hacer un menú para que el usuario elija una opción si quiere hacer la suma resta divicion y multiplicación de dos números pero creo tengo un error de desbordamiento de memoria hice 4 saltos y creo es con dos pero no se como hacerlo con dos espero me puedan ayudar
Les adjunto mi proyecto
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
.model small.stack 100h.data txtvalor1 db 'Ingrese el primer valor:$' txtvalor2 db 'Ingrese el segundo valor:$' ingreso db 'Ingrese un numero ::$' opcion_1 db 'Suma: $' opcion_2 db 'Resta$' opcion_3 db 'Multiplicacion$' opcion_4 db 'Divicion$' opcion_i db 'Opcion invalida$' newline db 10,13,'$'
numero db ? valor1 db ? valor2 db ?.code.startup mov ax, @data mov ds, ax lea dx, ingreso mov ah, 09hint 21h
mov ah, 01hint 21h
mov numero, al lea dx, newline mov ah, 09hint 21h
cmp numero, 01hje Imp_Op1
cmp numero, 02hje Imp_Op2
cmp numero, 03hje Imp_Op3
cmp numero, 04hje Imp_Op4
Imp_Op1: lea dx, txtvalor1 mov ah, 09int 21h
mov ah, 01hint 21h
sub al, 30h mov valor1, al lea dx, newline mov ah, 09hint 21h
lea dx, txtvalor2 mov ah, 09int 21h
mov ah, 01hint 21h
sub al, 30h mov valor2, al lea dx, newline mov ah, 09hint 21h
lea dx, opcion_1 mov ah, 09hint 21h
mov ax, 00h add al, valor1 add al, valor2 mov dl, al add dl, 30h mov ah, 02hint 21h
lea dx, newline mov ah, 09hint 21h
jmp salir
Imp_Op2: lea dx, txtvalor1 mov ah, 09int 21h
mov ah, 01hint 21h
sub al, 30h mov valor1, al lea dx, newline mov ah, 09hint 21h
lea dx, txtvalor2 mov ah, 09int 21h
mov ah, 01hint 21h
sub al, 30h mov valor2, al lea dx, newline mov ah, 09hint 21h
lea dx, opcion_1 mov ah, 09hint 21h
mov ax, 00h sub al, valor1 sub al, valor2 mov dl, al add dl, 30h mov ah, 02hint 21h
lea dx, newline mov ah, 09hint 21h
Imp_Op3: lea dx, opcion_3 mov ah, 09hint 21h
Imp_Op4: lea dx, opcion_4 mov ah, 09hint 21h
salir:.exitend
Les adjunto mi proyecto
- Calc.rar(567,0 B)
Valora esta pregunta


0