马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 china0008 于 2011-2-26 23:08 编辑 assume cs:code,ds:data,ss:stack
data segment
db 'welcome to masm!'
db 02h,24h,71h
data ends
stack segment
dw 3 dup(0)
stack ends
code segment
start: mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,6h
mov bx,10h ;用bx来索引颜色
xor si,si ;用si来索引字母
xor di,di
mov di,0720h
mov ax,0b800h
mov es,ax
mov cx,3 ;外循环次数为3
s0: push cx
push di
mov cx,16
s1: mov ah,[bx]
mov al,[si] ;用si来索引字母
push ax
pop es:[di]
inc si
add di,2h
loop s1
xor si,si
pop di
add di,0a0h ;换行
inc bx ;换颜色属性
pop cx
loop s0
mov ax,4c00h
int 21h
code ends
end start
win xp下 编译后有时也会显示不出来。我发现 你运行一下 debug 然后退出debug,再运行编译的好的程序就能正常工作了。 问题就处在虚拟8086.你的源码没有错误。我试验过了。
|