|
楼主 |
发表于 2005-4-26 11:20:00
|
显示全部楼层
附加题:<br>9 e( D- e0 P0 ?
data SEGMENT<br>: F2 ?9 V$ F& V, W6 f# \
data1 DB ' 12345',10,13,'+'<br>
7 Z4 S, c6 h v3 n W9 P9 Mdata2 DB '67890',10,13,'------',10,13,' '<br>4 T! h+ A) K4 [! U& |
data3 DB 6 DUP(?),'$'<br>
8 T, k% _! B6 Ddata ENDS<br>6 z/ c, m3 w( P6 V ~, v, e( X: o
code SEGMENT<br> ASSUME CS:code,DS:data<br>3 m E+ L$ R3 G. y
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 X8 O* I a( ~7 q
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># q& F* w. o5 e' j4 F
d0: MOV [data3-1],31h<br> JMP d2 <br>
- X ?8 s& F0 a& G, sd1: MOV [data3-1],20h<br>
" c5 y. Y) p: P; dd2: MOV DX,OFFSET data1<br> MOV AH,09h<br> INT 21h<br> MOV AH,4ch<br> INT 21h<br>
: ^' O5 l+ Y# jcode ENDS<br> END start<br>
% c0 K) ]% a( I& b |
|