[集会] 社区 2 十进制整数
对于社区 2 大整数,那么我们首先需要导入和导出是 2 十进制整数更大了. 你可以在看 进口和出口的原料.
下面是代码公开 2 十进制整数:
.model small
.stack 100
.data
inputA db 'Nhap so A = $'
inputB db 'Nhap so B = $'
outputResult db 'Tong A + B = $'
CLRF db 13, 10, '$'
.code
main proc
mov ax, @data
mov ds, ax
mov ah, 9 ; hien thi "Nhap so A = "
lea dx, inputA
int 21h
call inputDec ; goi CTC nhap so thu nhat he 10
push ax ; luu ax da nhap lai
call nextLine ; xuong dong
mov ah, 9 ; lam tuong tu voi so thu hai
lea dx, inputB
int 21h
call inputDec
mov bl, al
call nextLine
pop ax ; goi ax tu Stack ra
call sum ; goi ham tinh tong 2 so (trong ax va bx)
push ax ; luu ax lai
mov ah, 9 ; hien thi KQ
lea dx, outputResult
int 21h
pop ax
call outputDec ; goi CTC hien thi KQ
mov ah, 4ch
int 21h
main endp
sum proc ; CTC con tinh tong 2 so
add ax, bx
ret
sum endp
nextLine proc ; CTC xuong dong
mov ah, 9
lea dx, CLRF
int 21h
ret
nextLine endp
include includeinputDecProc.asm ; tep chua CTC nhap so he 10
include includeoutputDecProc.asm ; tep chua CTC hien thi so he 10
end main
你靠后 进口和出口的原料 或者可以看到 2 文件 inputDecProc.asm 和 outputDecProc.asm



我问为什么一些公共项目,它只是简单的写.
例如社区 2 所以,B.
负载;
Add(添加);
此举ç;
printf的ç;
新她了解这种语言, 不是很明白, 感谢你解释用Nhe户.
也许这只是社区 2 其中只有每个数 1 数字.
服务员 , 他指出输入和输出组件是不是你 ? 谢谢!
很长一段时间回到新的博客,了解更多的军队和DC 1 一些有用的内容
调用call sum时,ax只取出来 1 总共可以计算多少次?