求助 修改程序
一道作业:绘制三角形图形 要求:使PC在中分辨率显示一个等腰三角形 要通过BIOS INT 10H 调用
已有程序: 但是运行没有反应 求高手 指教 帮忙看看 程序哪里有问题
data segment
mess db 'triangle',0dh,0ah
cn equ $-mess
mess1 db '(0,0)',0ah,0dh,'$'
mess2 db '(0,100)',0ah,0dh,'$'
mess3 db '(100,0)',0ah,0dh,'$'
f_al db ?
data ends
code segment
assume cs:code,ds:data
start: mov ax,data
mov ds,ax
mov ah,0fh
int 10h
mov byte ptr f_al,al
mov al,4
int 10h
mov dx,60
mov cx,100
done1: mov ah,0ch
mov al,02h
int 10h
inc cx
inc dx
cmp dx,140
jnz done1
mov dx,140
mov cx,180
done2:mov ah,0ch
mov al,2
int 10h
dec cx
cmp cx,99
jnz done2
mov dx,60
mov cx,100
done3:mov ah,0ch
mov al,02h
int 10h
inc dx
cmp dx,140
jnz done3
mov ah,02h
mov dh,19
mov dl,13
int 10h
mov di,offset mess
mov cx,cn
lop:mov ah,0eh
mov al,[di]
inc di
mov bl,3
int 10h
loop lop
mov dh,17
mov dl,7
mov bx,offset mess1
call disp
mov dh,7
mov dl,5
mov bx,offset mess2
call disp
mov dh,17
mov dl,23
mov bx,offset mess3
call disp
mov dh,17
mov dl,23
mov bx,offset mess3
call disp
lop1:mov ah,06h
mov dl,0ffh
int 21h
jnz over
jmp lop1
over:mov ah,0
mov al,f_al
int 10h
mov ah,4ch
int 21h
disp proc near
mov ah,02h
int 10h
mov ah,09h
mov dx,bx
int 21h
ret
disp endp
code ends
end start
[此贴子已经被作者于2007-7-2 18:01:33编辑过]