mov ah,0ch
int 10h
cmp di,0
jz aa0
cmp di,1
jz aa1
call delay
aa1:
call delay
aa0:
inc cx
cmp cx,bx
jne H_line
jmp exit_line
V_line1:
add bx,dx
V_line:
mov ah,0ch
cmp di,0
jz bb0
cmp di,1
jz bb1
call delay
bb1:
call delay
bb0:
int 10h
inc dx
cmp dx,bx
jne V_line
exit_line:
pop bx
ret
draw_Line endp
xie_line proc near ;the procedure of draw a xie_line
add bx,cx
cmp si,1
jz xieline_1
xieline_0:
mov ah,0ch
int 10h
inc dx
inc cx
cmp cx,bx
jne xieline_0
jmp exit_xie
xieline_1:
mov ah,0ch
int 10h
dec dx
inc cx
cmp cx,bx
jne xieline_1
exit_xie:
ret
xie_line endp
Mid_line proc near ;draw a xie_line
add bx,cx
cmp si,2
jz midline_2
cmp si,3
jz midline_3
cmp si,4
jz midline_4
midline_1:
mov ah,0ch
int 10h
inc dx
add cx,2
cmp cx,bx
jne midline_1
jmp exit_lines
midline_2:
mov ah,0ch
int 10h
add dx,2
inc cx
cmp cx,bx
jne midline_2
jmp exit_lines
midline_3:
mov ah,0ch
int 10h
dec dx
add cx,2
cmp cx,bx
jne midline_3
jmp exit_lines
midline_4:
mov ah,0ch
int 10h
sub dx,2
inc cx
cmp cx,bx
jne midline_4
exit_lines:
ret
mid_line endp
box proc near ;draw a box
push cx
push dx
push cx
push dx
push cx
push dx
push cx
push dx
mov si,1
call draw_line ;top
pop dx
pop cx
add cx,bx
mov si,0
call draw_line ;right
pop dx
pop cx
mov si,0
call draw_line ;left
pop dx
pop cx
mov si,1
add dx,bx
call draw_line ;bottom
pop dx
pop cx
ret
box endp
space proc near ;display a space
mov ah,02
mov dl,' '
int 21h
ret
space endp
return proc near ;回车
mov ah,2
mov dl,0ah
int 21h
mov dl,0dh
int 21h
ret
return endp
text proc near ;显示文本信息
mov bh,0
mov dh,0
mov dl,0
mov ah,2
int 10h
mov dx,offset buff2
mov ah,09
int 21h
text endp
heart proc near
mov cx,136 ;draw_heart
mov dx,93
mov si,0
mov bx,5
mov al,2
call draw_line
mov cx,137 ;draw_heart
mov dx,91
mov si,0
mov bx,9
call draw_line
mov cx,138 ;draw_heart
mov dx,90
mov si,0
mov bx,12
call draw_line
mov cx,139 ;draw_heart
mov dx,89
mov si,0
mov bx,14
call draw_line
mov cx,140 ;draw_heart
mov dx,88
mov si,0
mov bx,16
call draw_line
mov cx,141 ;draw_heart
mov dx,88
mov si,0
mov bx,17
call draw_line
mov cx,142 ;draw_heart
mov dx,87
mov si,0
mov bx,19
call draw_line
mov cx,143 ;draw_heart
mov dx,87
mov si,0
mov bx,20
call draw_line
mov cx,144 ;draw_heart
mov dx,87
mov si,0
mov bx,21
call draw_line
mov cx,145 ;draw_heart
mov dx,88
mov si,0
mov bx,21
call draw_line
mov cx,146 ;draw_heart
mov dx,88
mov si,0
mov bx,22
call draw_line
mov cx,147 ;draw_heart
mov dx,89
mov si,0
mov bx,22
call draw_line
mov cx,148 ;draw_heart
mov dx,90
mov si,0
mov bx,22
call draw_line
mov cx,149 ;draw_heart
mov dx,91
mov si,0
mov bx,22
call draw_line
mov cx,150 ;1draw_heart
mov dx,91
mov si,0
mov bx,22
call draw_line
mov cx,151 ;draw_heart
mov dx,90
mov si,0
mov bx,22
call draw_line
mov cx,152 ;draw_heart
mov dx,89
mov si,0
mov bx,22
call draw_line
mov cx,153 ;draw_heart
mov dx,88
mov si,0
mov bx,22
call draw_line
mov cx,154 ;draw_heart
mov dx,88
mov si,0
mov bx,21
call draw_line
mov cx,155 ;draw_heart
mov dx,87
mov si,0
mov bx,21
call draw_line
mov cx,156 ;draw_heart
mov dx,87
mov si,0
mov bx,20
call draw_line
mov cx,157 ;draw_heart
mov dx,87
mov si,0
mov bx,19
call draw_line
mov cx,158 ;draw_heart
mov dx,88
mov si,0
mov bx,17
call draw_line
mov cx,159 ;draw_heart
mov dx,88
mov si,0
mov bx,16
call draw_line
mov cx,160 ;draw_heart
mov dx,89
mov si,0
mov bx,14
call draw_line
mov cx,161 ;draw_heart
mov dx,90
mov si,0
mov bx,12
call draw_line
mov cx,162 ;draw_heart
mov dx,91
mov si,0
mov bx,9
call draw_line
mov cx,163 ;draw_heart
mov dx,93
mov si,0
mov bx,5
call draw_line
ret
heart endp
delay proc near ;the procedure of delay
push cx
push dx
mov dx,25
dl2:
mov cx,2801
dl3:
loop dl3
dec dx
jnz dl2
pop dx
pop cx
ret
delay endp
clear proc near ;clear
mov al,0
mov bx,0
mov cx,0
mov dx,0
line:
mov ah,0ch
int 10h
inc cx
cmp cx,320
jne line
mov cx,0
inc dx
cmp dx,200
jne line
ret
clear endp
cls_box proc near
mov al,0
mov bx,0
mov cx,131
mov dx,81
s_line:
mov ah,0ch
int 10h
inc cx
cmp cx,170
jne s_line
mov cx,131
inc dx
cmp dx,120
jne s_line
ret
cls_box endp
code ends
end start