Hola a todos! ando haciendo un programita y la verdad apenas se imprimir algo en asm, este programa no me multiplica el numero que entra desde el teclado, a ver si alguien me ayuda, aqui esta :
; --- EXE file format
.model small
.stack 100h
.data
data2 db 10,"Introduzca el texto.", 10, 13, '$'
data3 db "Al terminar, presione Enter.", 10, 13, '$'
;--------- Insert Data and Equates HERE
;--------- Declare other variables with DB, DW, etc. here
.code
start:
mov ax, @data
mov ds, ax ;set segment register
mov es, ax ;set segment register
and sp, not 3 ;align stack to avoid AC fault
lea dx, data2
mov ah, 09
int 21h
lea dx, data3
mov ah, 09
int 21h
print1:
mov ah, 01
int 21h
cmp al, 0dh
je divx
jne print1
divx:
mov cx, 0
mov cl, al
mov al, cl
mov bl, 4
mul bl
mov dx, ax
mov ah, 9
int 21h
exit:
mov ax, 4c00h ; terminate program
int 21h
end start
mil gracias de antemano!
; --- EXE file format
.model small
.stack 100h
.data
data2 db 10,"Introduzca el texto.", 10, 13, '$'
data3 db "Al terminar, presione Enter.", 10, 13, '$'
;--------- Insert Data and Equates HERE
;--------- Declare other variables with DB, DW, etc. here
.code
start:
mov ax, @data
mov ds, ax ;set segment register
mov es, ax ;set segment register
and sp, not 3 ;align stack to avoid AC fault
lea dx, data2
mov ah, 09
int 21h
lea dx, data3
mov ah, 09
int 21h
print1:
mov ah, 01
int 21h
cmp al, 0dh
je divx
jne print1
divx:
mov cx, 0
mov cl, al
mov al, cl
mov bl, 4
mul bl
mov dx, ax
mov ah, 9
int 21h
exit:
mov ax, 4c00h ; terminate program
int 21h
end start
mil gracias de antemano!