用汇编语言编写两个程序:(奖励20分)!!

来源:百度知道 编辑:UC知道 时间:2024/05/03 07:12:25
第一个:任意输入两个数,然后输出两个数的和.
第二个:任意输入三个数,然后比较三个数的大小.
很简单的,多帮忙啊.答案对的肯定给你加分.

第一个题:
;功能:进行三个大数的相加 最多可以输入(1——50位)

.model small
.386
.stack 400h
.data
first_add db 50,0,50 dup(0)
second_add db 50,0,50 dup(0)
third_add db 50,0,50 dup(0)
shuchu db 'The add result is:','$'
tishi db 'Please input the add1 number:','$'
tishi1 db 'Please input the add2 number:','$'
tishi2 db 'Please input the add2 number:','$'

;宏操作
input macro do
mov ah,2 ;置光标
mov bh,0
mov dl,12 ;列号
int 10h
mov dx,si
mov ah,9 ;显示字符串
int 21h
lea dx,do ;存放加数
mov ah,0ah ;暂停,任意键关闭<