|
楼主 |
发表于 2005-4-26 11:20:00
|
显示全部楼层
附加题:<br># g* a4 u7 N9 P& j& g/ i& `! W: \0 E
data SEGMENT<br>
7 ?! G* n1 R8 ~6 S9 B( G0 }data1 DB ' 12345',10,13,'+'<br>! C+ S$ K6 @, B9 b' ^7 ~0 @" `8 F
data2 DB '67890',10,13,'------',10,13,' '<br>. c3 |/ b# ?. a: M
data3 DB 6 DUP(?),'$'<br>
# {6 U7 ~1 r) x) o7 l4 A" Fdata ENDS<br>
0 {; h+ c% n6 I3 ~5 s& Ecode SEGMENT<br> ASSUME CS:code,DS:data<br>. w/ _! t- t+ _& O: M
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>
8 L$ ^ D6 T' zagain1: 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>+ C/ ]8 L' i4 }% {1 y* K, U
d0: MOV [data3-1],31h<br> JMP d2 <br>; N/ c0 N f- Z7 Y y
d1: MOV [data3-1],20h<br>0 v! |7 |# j' U$ S+ c$ Y! f2 u
d2: MOV DX,OFFSET data1<br> MOV AH,09h<br> INT 21h<br> MOV AH,4ch<br> INT 21h<br>
) a: d% W& d, g8 Q6 z( w1 gcode ENDS<br> END start<br>
* k- l8 v- e, @* R M" H1 I' X |
|