|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
assume cs:code
data segment
db "Welcome to masm!!",0
data ends
code segment
lo1:
push cl
mov ax,data
mov ds,ax
mov si,0
mov ax,0b800h
mov ds,ax
mov di,0 ;初始化
mov ax,0
mov ax,160
mul dh
mov di,ax
mov ax,0
mov ax,2
mul dl
add di,ax ;初始化显示位置
s:mov cl,ds:[si]
jcxz over ;判断是否为0,是则退出
mov es:[di],cl ;显示字符
pop cl ;颜色出栈
mov es:[di+1],cl ;显示属性
push cl
add di,2
inc si
jmp short s
over:
iret
lo2:nop
start:
mov ax,cs
mov ds,ax
mov si,offset lo1
mov ax,0
mov es,ax
mov di,200h
mov cx,offset lo2-offset lo1
cld
rep movsb
mov word ptr es:[7ch*4],200h
mov word ptr es:[7ch*4+2],0
mov cx,0
mov cl,02
mov dl,12
mov dh,5
int 7ch
mov ax,4c00h
int 21h
code ends
end start
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
错误在哪里,为什么编译能过运行的时候debug直接就死了。。
不是死循环的那种,直接屏幕就黑了。。 |
|