
CODE: [Copy to clipboard][ Last edited by netwinxp on 2010-7-6 at 19:39 ]DSEG SEGMENT
buff1 db 0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20
datalen equ $-buff1;要常用伪指令来使程序更容易修改。
buff2 db datalen dup(?)
DSEG ENDS
CSEG SEGMENT
assume cs:CSEG,ds:DSEG
MAIN PROC FAR;主程序入口
mov ax,seg DSEG
mov ds,ax
mov es,ax
cld
mov si,offset buff1
mov di,offset buff2
mov cx,datalen
rep movsb;串COPY操作在软件中频繁使用,所以循环体越小越好。
mov ax,4c00h;程序结束,返回到操作系统系统
int 21h
MAIN ENDP
CSEG ENDS
END MAIN
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |