Can someone help me to make this problem i have to read from keyboard a number maximum 9 digits and multiply them and the show the result, and i have to press enter to validate the entry
introdu_latime:
mov ah, 09h
mov dx, offset msg4
int 21h
mov si, offset latime
citire:
mov ah, 01h
int 21h
cmp al, 13
je menu_loop
mov [si], al
inc si
jmp citire
introdu_lungime:
mov ah, 09h
mov dx, offset msg3
int 21h
mov si, offset lungime
citire2:
mov ah, 01h
int 21h
cmp al, 13
je menu_loop
mov [si], al
inc si
jmp citire2
afiseaza_aria:
; Calculeaza perimetrul
mov eax, latime ; Aduna latimea cu ea insasi
imul lungime ; Aduna lungimea
mov perimetru, ax
; Converteste perimetrul la sir de caractere
mov si, 5
mov sir_nr[si], '$'
mov ax, perimetru
; Converteste perimetrul la sir de caractere
repeta_perimetru:
mov dx, 0
div imp
add dl, '0'
mov sir_nr[si], dl
dec si
cmp ax, 0
jne repeta_perimetru
; Afiseaza sirul de caractere
mov ah, 09h
mov dx, offset msg5
int 21h
mov dx, offset sir_nr
int 21h
jmp menu_loop
this is the part of the code
Acsinte Andrei is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.