本帖最后由 陌路狂奔 于 2011-6-27 10:47 编辑
[code/][/assume cs:code,ds:data,ss:stack
data segment ;数据段
db 'welcome !'
data ends
stack segment ;堆栈段
dw 0,0,0,0,0,0
stack ends
code segment ;代码段
start:mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
mov ax,data
mov ds,ax
mov sp,10
mov si,0
mov ax,0b800h
mov es,ax
mov di,0
mov bx,0
mov cx,3
yes:push cx ;外循环 外循环的cx入栈
push si
push di
mov cx,9 ;内循环
s1:
mov al,ds:[si] ;字符字节
mov ah,0cah ;颜色字节
mov es:[di+bx],ax ;把ax传给目标字内存
add si,1
add di,2
loop s1
add bx,0a0h
pop di
POP si
pop cx ;外循环的cx出照栈
loop yes
mov ax,4c00h
int 21h
code ends
end start
没编译,我觉得这样应该可行,试一下吧
|