|
楼主 |
发表于 2005-4-26 11:20:00
|
显示全部楼层
附加题:<br># ]8 Z3 p4 [# A. o q K' Q+ Z2 P- L
data SEGMENT<br>0 [; `3 w/ u( H0 P
data1 DB ' 12345',10,13,'+'<br>
/ K+ [* J2 S: ?( a/ a- `data2 DB '67890',10,13,'------',10,13,' '<br>
7 v- X C @- C' Qdata3 DB 6 DUP(?),'$'<br>
6 n/ J! Y& Y' g& _$ i' [data ENDS<br>% e* Q* C% W" w t2 h6 r0 Y
code SEGMENT<br> ASSUME CS:code,DS:data<br>
* P7 S6 [$ P* ^start: MOV AX,data<br> MOV DS,AX<br> LEA SI,data1<br> LEA DI,data2<br> LEA BX,data3<br> CLC<br> MOV CX,5 <br> <br>6 e# p: `* \# _3 E9 J+ y
again1: MOV AL,[SI+5]<br> ADC AL,[DI+4]<br> AAA<br> PUSHF<br> ADD AL,30h<br> POPF<br> MOV [BX+4],AL<br> DEC SI<br> DEC DI<br> DEC BX<br> LOOP again1<br> JNC d1 <br>( `, O: Q3 ~ R4 S6 O4 a7 m2 J
d0: MOV [data3-1],31h<br> JMP d2 <br>
/ s+ R6 u1 a8 e& e$ j( N4 Wd1: MOV [data3-1],20h<br>
% V' d+ \: t1 B! n5 a" I& Nd2: MOV DX,OFFSET data1<br> MOV AH,09h<br> INT 21h<br> MOV AH,4ch<br> INT 21h<br>
& Q, B" Y+ e2 p$ S- T" D) Rcode ENDS<br> END start<br>
! w9 A# \" K7 F |
|