21,500
社区成员
发帖
与我相关
我的任务
分享
assume cs:codesg,ds:datasg
datasg segment
info db 'please input the number!$'
result db 0
datasg ends
codesg segment
main:
mov dx,datasg
mov ds,dx
mov dx,offset info
mov ah,9
int 21h
mov ah,0
int 16h
mov ch,0
sub al,30h
mov cl,al
mov dx,0
l:
int 16h
sub al,30h
add ds:[result],al
loop l
mov ax,4c00h
int 21h
codesg ends
end main