📄 fmenu.asm
字号:
dec cx
add dx,2
inc full
cmp full,30
jne fill_y1
ret
fill_2 endp
fill_3 proc near
mov al,1
mov full,0
mov si,0
mov cx,140
mov dx,121
mov bx,60
re_fill:
push bx
push cx
push dx
call draw_line
pop dx
pop cx
pop bx
inc cx
inc full
cmp full,9
jne re_fill
mov full,0
mov cx,159
mov dx,121
mov bx,60
re_fill2:
push bx
push cx
push dx
call draw_line
pop dx
pop cx
pop bx
dec cx
inc full
cmp full,9
jne re_fill2
ret
fill_3 endp
draw_Line proc near ;the procedure of draw a line
push bx
cmp si,0
jz V_line1
add bx,cx
H_line:
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
clear3 proc near ;clear
mov al,0
mov bx,0
mov cx,0
mov dx,0
line3:
mov ah,0ch
int 10h
inc cx
cmp cx,320
jne line3
mov cx,0
inc dx
cmp dx,200
jne line3
ret
clear3 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
appg3 endp
appg4 proc near ;功能软件4
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
call main
ret
appg4 endp
savedisplay proc near
push ax
push bx
push cx
push dx
push ds
mov ax,0002h
int 33h
mov bx,0d
mov cx,3840d
loop1:
mov ax,0b800h
mov ds,ax
mov dl,ds:[bx]
mov ax,data
mov ds,ax
mov bak[bx],dl
inc bx
loop loop1
mov ax,0001h
int 33h
pop ds
pop dx
pop cx
pop bx
pop ax
savedisplay endp
backdisplay proc near
push ax
push bx
push cx
push dx
push ds
mov bx,0d
mov cx,3840d
loop11:
mov ax,data
mov ds,ax
mov dl,bak[bx]
mov ax,0b800h
mov ds,ax
mov ds:[bx],dl
inc bx
loop loop11
pop ds
pop dx
pop cx
pop bx
pop ax
ret
backdisplay endp
quitt proc near ;退出
call backdisplay
win 0,07h,15,10,17,61
win 0,24h,14,9,16,60,
mov dh,15
mov dl,9
mov bh,0
mov ah,2
int 10h
;lea dx,message2
mov ah,9
int 21h
mov bx,0
qll:
mov ah,1
int 21h
cmp al,0dh
je qlll
mov path[bx],al
inc bx
jmp qll
qlll:
win 0,07h,15,10,17,61
win 0,3eh,14,9,16,60
call backdisplay
lea dx,path
mov ah,3ch
mov cx,00
int 21h
mov handle,ax
lea dx,buffer
mov bx,handle
mov cx,2000
mov ah,40h
int 21h
mov bx,handle
mov ah,3eh
int 21h
call backdisplay
win 0,07h,0,0,24,79
mov ah,4ch
int 21h
ret
quitt endp
win3 proc near ;显示日期
mov ah,2ah
int 21h
mov bl,10d
mov ax,0
mov al,dh
div bl
add ax,3030h
mov [date+6],al
mov [date+7],ah
mov ax,0
mov al,dl
div bl
add ax,3030h
mov [date+9],al
mov [date+10],ah
win 0,1dh,0,67,0,79
pos_curse 0,0,67
mov dx,offset date
mov ah,09h
int 21h
ret
win3 endp
win4 proc near ;显示行//列
mov ah,03h
mov bh,0
int 10h
mov bl,100d
mov bh,10d
mov ax,0
mov al,dh
div bl
add al,30h
mov [hanglie+0],al
mov al,ah
mov ah,0
div bh
add ax,3030h
mov [hanglie+1],al
mov [hanglie+2],ah
mov ax,0
mov al,dl
div bl
add al,30h
mov [hanglie+5],al
mov al,ah
mov ah,0
div bh
add ax,3030h
mov [hanglie+6],al
mov [hanglie+7],ah
win 0,1dh,24,60,24,70
pos_curse 0,24,61
mov dx,offset hanglie
mov ah,09h
int 21h
ret
win4 endp
code ends
end start ;结束
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -