微机原理课程设计_学生成绩管理系统_汇编课程设计 第3页

 

modify proc near
push ax
push bx
push cx
push dx
clear1
set_p1 4
mov dx,offset fname
mov al,2
mov ah,3dh
int 21h
mov bx,ax
mov handle,ax
call get_rec          ; contact is in  buffer1
read:
mov dx,offset buffer2
mov cx,23
mov ah,3fh
int 21h
lea si,buffer2
lea di,buffer1
mov cx,15
c5:
mov dl,byte ptr[si]
cmp dl,byte ptr[di]
jnz read
inc si
inc di
loop c5
mov bx,handle
mov ah,42h
mov al,1
mov cx,0ffffh
mov dx,-23
int 21h
mov cx,23
mov dx,offset buffer1
mov ah,40h
int 21h
mov ah,3eh
int 21h
jmp exit2
exit1:
set_p2
show err1
exit2:
set_p3
pop dx
pop cx
pop bx
pop ax
ret
modify endp

delete proc near
push ax
push bx
push cx
push dx
clear1
set_p1 4
mov dx,offset fname
mov al,2
mov ah,3dh
int 21h
mov bx,ax
mov handle,ax
getin buffer1,15          ; contact is in  buffer1
read5:
mov dx,offset buffer2
mov cx,23
mov ah,3fh
int 21h
lea si,buffer2
lea di,buffer1
mov cx,15
c6:
mov dl,byte ptr[si]
cmp dl,byte ptr[di]
jnz read5
inc si
inc di
loop c6
mov bx,handle
mov ah,42h
mov al,1
mov cx,0ffffh
mov dx,-8
int 21h
mov cx,8
mov dx,offset del
mov ah,40h
int 21h
mov ah,3eh
int 21h
jmp exit6

exit5:
set_p2
show err1
exit6:
set_p3
pop dx
pop cx
pop bx
pop ax
ret
delete endp

list   proc   near
push ax
push bx
push cx
push dx

clear1
clear2
set_p2
show mess11
mov dx,offset fname
mov al,2
mov ah,3dh
int 21h
mov bx,ax
again:
mov dx,offset buffer1
mov cx,23
mov ah,3fh
int 21h
cmp ax,0
jz p
show_item buffer1
jmp again
p:
mov ah,3eh
int 21h
set_p3
pop dx
pop cx
pop bx
pop ax
ret
list   endp

print  proc near
push ax
call openf
mov cl,count
mov ch,0
read2:
mov dx,offset buffer1
mov cx,type score
mov ah,3fh
int 21h
mov cx,23h
mov bx,0
next:  mov ah,5
mov dl,byte ptr buffer1[bx]
int 21h
inc bx
loop next
mov ah,5
mov dl,0dh
int 21h
dec x
cmp x,0
jnz read2
mov bx,handle
mov ah,3eh
int 21h
pop ax
ret
print  endp

cot  proc
push ax
clear2
set_p2
show mess12
mov dx,offset fname
mov ah,3dh
int 21h
mov bx,ax
mov handle,ax
read0: mov dx,offset buffer2
mov cx,23
mov ah,3fh
int 21h
mov dl,[buffer2+15]
cmp dl,'6'
jl  five
cmp dl,'7'
jl  six
cmp dl,'8'
jl  seven
cmp dl,'9'
jl  eight
inc [buffer3+4]
jmp quit
eight:
inc [buffer3+3]
jmp quit
seven: inc [buffer3+2]
jmp quit
six:   inc [buffer3+1]
jmp quit
five:  inc [buffer3]
quit:  cmp ax,0
jnz read0
mov cx,10
a:     mov dl,' '
mov ah,2
int 21h
loop a
mov bx,0
a0:    mov dl,[buffer3+bx]
mov ah,2
int 21h
inc bx
mov dl,' '
mov ah,2
int 21h
mov dl,' '
mov ah,2
int 21h
cmp bx,5
jnz a0
mov bx,handle
mov ah,3eh
int 21h
set_p3
pop ax
ret
cot  endp
code   ends
end start

上一页  [1] [2] [3] 

Copyright © 2007-2012 www.chuibin.com 六维论文网 版权所有