Install Steam
sign in
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem

.code
org 100h
start:
call input
perevod:
mov cx,8h
mov
xor dx,dx
div cx
push ax
xor ax,ax
mov ax,bx
mul [0ah]
add ax,dx
mov bx,ax
pop ax
cmp ax,0h
jne perevod
print:
xor cx,cx
mov ax,bx
mov bx,0ah
inc cx
div bx
add dx,30h
push dx
cmp ax,0
jnz print
loop_of_print:
pop ax
mov ah,0eh
int 10h
loop loop_of_print
ret
input: ; процедура ввода
xor ax,ax ;s=0
mov bx,0ah ;r=10
loop_of_input:
push ax
mov ah,10h ; ВВЕЛ ЦИФРУ ah=scan al-ascii
int 16h
mov cx,ax
cmp al,0dh ; проверил на конец ввода
jnz process
pop ax
ret
process:
pop ax
mul bx ; s*10
xor ch,ch
sub cl,30h
add ax,cx ; s+=цифра
jmp loop_of_input
ends
end start