这是实验9的代码自己写的可运行后效果不一样求各位高手指点一二
本帖最后由 dps521 于 2014-2-6 15:36 编辑assume cs:code
date segment
db 'welcome to masm!'
date ends
code segment
start:
mov ax,date
mov ds,ax
mov bx,
mov si,0
mov di,0
mov ax,0b800h
mov cx,16
mov es,ax
s:mov al,ds:
mov es:,al
mov dl,2h
mov es:,dl
mov es:,al
mov dl,24h
mov es:,di
mov es:,al
mov dl,71h
mov es:,dl
add di,2
inc si
loop s
jmp near ptr start
mov ax,4c00h
int 21h
code ends
end start 各位给找找问题吗 assume cs:code
date segment
db 'welcome to masm!'
date ends
code segment
start:
mov ax,date
mov ds,ax
mov bx,0;0<--
mov si,0
mov di,0
mov ax,0b800h
mov cx,16;循环
mov es,ax
s:mov al,ds:
mov es:,al
mov dl,2h ;颜色?
mov es:,dl
mov es:,al
mov dl,24h
; mov es:,di ;di?
mov es:,dl
mov es:,al
mov dl,71h
mov es:,dl
add di,2
inc si
loop s
jmp near ptr start
mov ax,4c00h
int 21h
code ends
end start 代码要注意整洁,排版好一点也容易发现问题。:lol: 你这段代码能执行?第9行,mov bx,0 0没写啊
第22行,3楼指出了,mov es:,di 是不是该为dl呢?
loop s
jmp near ptr start
loop的后面,为何再来一句jmp,又跳回入口点重新执行,那程序如何退出?
我来学习一下。
页:
[1]