当前位置:首页 » 存储配置 » 数据存储程序

数据存储程序

发布时间: 2022-11-08 08:38:22

❶ 内存数据存储程序设计 (微机原理课程设计)

data segment
msg1 db 'Please enter the filename to save:$'
msg2 db 'Creating success!',10,13,'$'
msg3 db 'Creation failed!',10,13,'$'
msg4 db 'The disk has been full!',10,13,'$'
msg5 db 'Write success!',10,13,'$'
msg6 db 'write failed!',10,13,'$'
msg7 db 'open failed!',10,13,'$'
msg8 db 'read failed!',10,13,'$'
msg9 db 'the result read from file is:',10,13,'$'
coun dw 0
handle dw ?
nam db 20,?,20 p (?)
read db 200 p(?)
data ends
stack segment
db 200 p (?)
stack ends
code segment
assume cs:code,ds:data,ss:stack
start:
mov ax,data
mov ds,ax
mov ah,9
lea dx,msg1
int 21h
mov ah,10
lea dx,nam
int 21h
mov al,byte ptr[nam+1]
xor ah,ah
lea bx,[nam+2]
add bx,ax
mov [bx],0
mov [nam+1],'\'
call crfile
call wrfile
call refile
mov ah,4ch
int 21h

crfile proc
push ax
push bx
push cx
push dx
push di
push si
lea dx,[nam+1]
mov cx,0
mov ah,3ch
int 21h
jc error
mov handle,ax
call enter1
lea dx,msg2
mov ah,09
int 21h
mov bx,handle
mov ah,3eh
int 21h
jmp exit
error:
call enter1
lea dx,msg3
mov ah,9
int 21h
exit:
pop si
pop di
pop dx
pop cx
pop bx
pop ax
ret
crfile endp

wrfile proc
push ax
push bx
push cx
push dx
push di
push si

lea dx,[nam+1]
mov al,01;以写方式
mov ah,3dh
int 21h
jc error1
mov handle,ax
mov bx,ax
push ds
mov ax,0b02h
mov ds,ax
mov dx,0
mov di,dx
again1:
cmp byte ptr[di],1Ah;ctrl+z
je out1
inc di
jmp again1
out1:
mov cx,di
mov ah,40h
int 21h
pop ds
jc werror
cmp ax,cx
je pass1
lea dx,msg4
mov ah,9
int 21h
jmp pass
pass1:
mov coun,ax
lea dx,msg5
mov ah,9
int 21h
pass:mov bx,handle
mov ah,3eh
int 21h
jmp exit1
error1:
lea dx,msg7
mov ah,09h
int 21h
jmp exit1
werror:
lea dx,msg6
mov ah,09h
int 21h
exit1:

pop si
pop di
pop dx
pop cx
pop bx
pop ax
ret
wrfile endp

refile proc
push ax
push bx
push cx
push dx
push di
push si

lea dx,[nam+1]
mov al,0;以读方式
mov ah,3dh
int 21h
jc error2
mov handle,ax
mov bx,handle
lea dx,read
mov cx,coun
mov ah,3fh
int 21h
jc error3
lea si,read
add si,ax
mov byte ptr[si],'$'
lea dx,msg9
mov ah,9
int 21h
lea dx,read
mov ah,9
int 21h
mov bx,handle
mov ah,3eh
int 21h
jmp exit2
error2:
lea dx,msg7
mov ah,09h
int 21h
jmp exit2
error3:lea dx,msg8
mov ah,9
int 21h
jmp exit2
exit2:
pop si
pop di
pop dx
pop cx
pop bx
pop ax
ret
refile endp
enter1 proc
push ax
push dx
mov ah,2
mov dl,10
int 21h
mov dl,13
int 21h
pop dx
pop ax
ret
enter1 endp

code ends
end start

❷ 什么是数据库存储过程

存储过程(Stored Procere)是在大型数据库系统中,一组为了完成特定功能的SQL 语句集,它存储在数据库中,一次编译后永久有效,用户通过指定存储过程的名字并给出参数(如果该存储过程带有参数)来执行它。存储过程是数据库中的一个重要对象。在数据量特别庞大的情况下利用存储过程能达到倍速的效率提升。

这类语言主要提供以下功能,让用户可以设计出符合应用需求的程序:

1、变量说明

2、ANSI(美国国家标准化组织)兼容的SQL命令(如Select,Update….)

3、一般流程控制命令(if…else…、while….)

4、内部函数

(2)数据存储程序扩展阅读:

种类

1、系统存储过程

2、本地存储过程

3、临时存储过程

4、远程存储过程

5、扩展存储过程

热点内容
能缓存航海王 发布:2025-07-15 04:55:38 浏览:90
安卓手机投屏为什么只能本地视频 发布:2025-07-15 04:51:19 浏览:537
栈的存储结构 发布:2025-07-15 04:51:16 浏览:233
现在天龙八部脚本 发布:2025-07-15 04:45:35 浏览:332
优酷缓存后怎么竖屏观看 发布:2025-07-15 04:44:09 浏览:247
蚁周算法 发布:2025-07-15 04:34:28 浏览:600
电脑服务器名称写什么 发布:2025-07-15 04:29:53 浏览:430
安卓编译打包 发布:2025-07-15 04:24:20 浏览:169
bat编译器 发布:2025-07-15 04:18:07 浏览:54
中兴服务器登录地址 发布:2025-07-15 04:02:47 浏览:988