用汇编语言将两个两位十进制数相加
CODESEGMENTASSUMECS:CODE
STR1DB'99+88','=$'
XDB2DUP(0)
YDB2DUP(0)
REDB3DUP(0),'$'
START:
PUSHCS
POPDS
PUSHCS
POPES
LEADX,STR1
MOVAH,9
INT21H
LEASI,STR1
MOVAL,[SI+1]
ANDAL,0FH
MOVX,AL
MOVAL,[SI]
ANDAL,0FH
MOVX+1,AL
MOVAL,[SI+4]
ANDAL,0FH
MOVY,AL
MOVAL,[SI+3]
ANDAL,0FH
MOVY+1,AL
MOVAL,X
ADDAL,Y
AAA
PUSHF
ORAL,30H
MOVRE+2,AL
POPF
MOVAL,X+1
ADCAL,Y+1
AAA
PUSHF
ORAL,30H
MOVRE+1,AL
POPF
MOVAL,0
ADCAL,0
ORAL,30H
MOVRE,AL
LEADX,RE
MOVAH,9
INT21H
MOVAH,4CH
INT21H
CODEENDS
ENDSTART
上一篇:两个位数怎样快速的相加
下一篇:多肉植物怎么养
多重随机标签