📄 edxiug.asm
字号:
open proc near ;打开文件
call backdisplay
win 0,07h,15,10,17,61
win 0,24h,14,9,16,60
pos_curse 0,15,9
string mess3
mov bx,0
cll:
mov ah,1
int 21h
cmp al,13
je clll
mov path[bx],al
inc bx
jmp cll
clll:
win 0,14h,1,0,23,79
lea dx,path
mov ah,3dh
mov al,0
int 21h
mov handle,ax
lea dx,buffer
mov bx,handle
mov cx,2000
mov ah,3fh
int 21h
win 0,14h,1,23,1,79
pos_curse 0,1,0
mov cx,1000
sub bx,bx
replay:
mov dl,buffer[bx]
inc bx
mov ah,2
int 21h
loop replay
mov bx,handle
mov ah,3eh
int 21h
pos_curse 0,1,0
mov cx,10
mov bx,0
cleapath_3:
mov bl,0
mov path[bx],bl
loop cleapath_3
jmp char_get
ret
open endp
;---------------------------------------------------------------------
save proc near ;保存文件
pos_get
push dx
win 0,3eh,1,0,6,10
call backdisplay
mov ah,path
cmp ah,21h
jl j_3
jmp j_4
j_3:
win 0,07h,15,10,17,61
win 0,24h,14,9,16,60,
pos_curse 0,15,9
string mess2
mov bx,0
dll:
mov ah,1
int 21h
cmp al,0dh
je dlll
mov path[bx],al
inc bx
jmp dll
dlll:
win 0,3eh,1,0,23,79
pop dx
pos_curse 0,dh,dl
j_4: 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
jmp char_get
ret
save endp
;---------------------------------------------------------------------
saveas proc near ;另存为
win 0,3eh,1,0,6,10
call backdisplay
win 0,07h,15,10,17,61
win 0,24h,14,9,16,60,
pos_curse 0,15,9
string mess2
mov bx,0
bll:
mov ah,1
int 21h
cmp al,0dh
je blll
mov path[bx],al
inc bx
jmp bll
blll:
pos_get
push dx
win 0,3eh,1,0,23,79
call backdisplay
pop dx
pos_curse 0,dh,dl
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
jmp char_get
ret
saveas endp
;---------------------------------------------------------------------
quitt proc near ;退出
call backdisplay
win 0,07h,15,10,17,61
win 0,24h,14,9,16,60,
pos_curse 0,15,9
string mess2
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
;---------------------------------------------------------------------
help proc near ;显示帮助信息
win 0,14h,1,29,3,40
call backdisplay ;显示帮助信息每行的位置
pos_get
push dx
win 0,57h,2,5,22,70
pos_curse 0,3,13
string help_mas0
pos_curse 0,4,13
string help_mas1
pos_curse 0,6,13
string help_mas2
pos_curse 0,8,13
string help_mas3
pos_curse 0,10,13
string help_mas4
pos_curse 0,12,13
string help_mas5
pos_curse 0,14,13
string help_mas6
pos_curse 0,16,13
string help_mas7
pos_curse 0,18,13
string help_mas8
pos_curse 0,20,13
string help_mas9
pop dx
pos_curse 0,dh,dl
mov ah,0
int 16h
cmp ah,36h ;F10 active help
jnz cls
call help
cls:
win 0,14h,1,0,23,79 ;清屏
call backdisplay
ret
help endp
;---------------------------------------------------------------------
command proc near
win 0,14h,1,29,3,40
call backdisplay
pos_get
push dx
win 0,81h,2,5,22,70
pos_curse 0,5,7
string com_mess0
pos_curse 0,6,7
string com_mess1
pos_curse 0,7,7
string com_mess2
pos_curse 0,8,7
string com_mess3
pos_curse 0,9,7
string com_mess4
pos_curse 0,10,7
string com_mess5
pos_curse 0,11,7
string com_mess6
pos_curse 0,12,7
string com_mess7
pos_curse 0,13,7
string com_mess8
pos_curse 0,14,7
string com_mess9
pos_curse 0,15,7
string com_mess10
pos_curse 0,16,7
string com_mess11
pop dx
pos_curse 0,dh,dl
mov ah,0
int 16h
cmp ah,36h ;F10 active help
jnz cls1
call command
cls1:
win 0,14h,1,0,23,79 ;清屏
call backdisplay
ret
command endp
;---------------------------------------------------------------------
backdisplay proc near ;显示背景的文本内容
push ax
push bx
push cx
push dx
push ds
mov bx,00
mov cx,3840
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
;---------------------------------------------------------------------
;-----------------------------------------------------------
setcolor proc near
mov bx,flag
cmp bx,1
jz L1
cmp bx,2
jz L2
cmp bx,3
jz L3
L1:jmp L10
L2:jmp L20
L3:jmp L30
L10:
win 0,0eh,1,0,24,79 ;窗口背景色为黑色
win 1,3eh,0,0,0,79
win 0,3eh,24,0,24,79
pos_curse 0,0,1
string menu
pos_curse 0,24,1
string mess
call win3
pos_curse 0,1,0 ;初始化光标位置
call win4
pos_curse 0,1,0
jmp exit1
L20:
win 0,4fh,1,0,24,79 ;窗口背景色为红色
win 1,3eh,0,0,0,79
win 0,3eh,24,0,24,79
pos_curse 0,0,1
string menu
pos_curse 0,24,1
string mess
call win3
pos_curse 0,1,0 ;初始化光标位置
call win4
pos_curse 0,1,0
jmp exit1
L30:
win 0,7dh,1,0,24,79 ;窗口背景色为灰色
win 1,3eh,0,0,0,79
win 0,3eh,24,0,24,79
pos_curse 0,0,1
string menu
pos_curse 0,24,1
string mess
call win3
pos_curse 0,1,0 ;初始化光标位置
call win4
pos_curse 0,1,0
exit1: ;call backdisplay
string help_mas2
jmp char_get
ret
setcolor endp
;---------------------------------------------------------------------
;---------------------------------------------------------------------
win3 proc near ;显示日期
mov ah,2ah ;取系统日期
int 21h
push dx
mov dx,00h
mov bx,1000
mov ax,cx ;年
div bx
add al,30h
mov [date+5],al
mov al,dl
mov ah,00h
mov bl,100
div bl
add al,30h
mov [date+6],al
mov al,ah
mov ah,00h
mov bl,10
div bl
add ax,3030h
mov [date+7],al
mov [date+8],ah
pop dx
mov ax,0
mov al,dh ;月
div bl
add ax,3030h
mov [date+10],al
mov [date+11],ah
mov ax,0
mov al,dl ;日
div bl
add ax,3030h
mov [date+13],al
mov [date+14],ah
win 0,3eh,0,64,0,79
pos_curse 0,0,64
string date
ret
win3 endp
;---------------------------------------------------------------------
win4 proc near ;显示行//列
pos_get ;显示当前光标位置
mov bl,100d ;显示行号
mov bh,10d
mov ax,0
mov al,dh
div bl
add al,30h
mov [hanglie+4],al
mov al,ah
mov ah,0
div bh
add ax,3030h
mov [hanglie+5],al
mov [hanglie+6],ah
mov ax,0 ;显示列号
mov al,dl
div bl
add al,30h
mov [hanglie+12],al
mov al,ah
mov ah,0
div bh
add ax,3030h
mov [hanglie+13],al
mov [hanglie+14],ah
win 0,3eh,24,64,24,79
pos_curse 0,24,64
string hanglie
ret
win4 endp
;---------------------------------------------------------------------
font proc near
win 0,1eh,1,1,7,50
call backdisplay
mov ah,2ch ;取系统时间
int 21h
mov bl,10 ;时
mov al,ch
mov ah,00h
div bl
add ax,3030h
mov [time+5],al
mov [time+6],ah
mov al,cl ;分
mov ah,00h
div bl
add ax,3030h
mov [time+8],al
mov [time+9],ah
mov al,dh ;秒
mov ah,00h
div bl
add ax,3030h
mov [time+11],al
mov [time+12],ah
pos_curse 0,23,65
string time
pos_curse 0,1,0
jmp char_get
ret
font endp
;---------------------------------------------------------------------
code ends
;---------------------------------------------------------------------
end start ;结束
;*********************************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -