帮忙看下这段程序那里错了
初学汇编 题目要求是写7ch中断实现在屏幕上显示一个字符串
我这样写的
cs:code
data segment
db "hello to masm",0
data ends
stack segment
db 64 dup(0)
stack ends
code segment
start: mov ax,data ;寄存器初始化
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,64
push ds
mov cx,offset d7cend-offset d7c ;安装d7c程序
mov ax,0000h
mov es,ax
mov ax,cs
mov ds,ax
mov di,200h
mov si,offset d7c
cld
rep movsb
mov word ptr es:[7ch*4],200h
mov word ptr es:[7ch*4+2],0000h
pop ds
mov ah,20 ;7ch中断调用初始化
mov al,12
mov si,0
int 7ch ;调用7ch中断程序
mov ax,4c00h
int 21h
;--------7ch中断---------
d7c: push si ;字符串起始地址
push es
push di
push ax ;显示行列
push cx
mov di,0b800h
mov es,di
dec ah
dec al
push ax
mov ah,160
mul ah
mov di,ax
pop ax
mov al,ah
mov ah,0
add ax,ax
add di,ax
mov ch,0
l: mov cl,ds:[si]
jcxz lend
mov es:[di],cl
inc si
add di,2
jmp l
lend: pop cx
pop ax
pop di
pop es
pop si
iret
d7cend: nop
code ends
end start
我用的系统是vista 运行的时候好像没有显示