毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 课程设计 >> 正文

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

更新时间:2007-10-25:  来源:毕业论文

 

getin   macro addrs,count2
local   zeroit,lp,input_end,exit
push bx
push ax
mov bx,0
zeroit: mov addrs[bx],' '
inc bx
cmp bx,15
jl  zeroit

mov bx,0
lp:     mov ah,1
int 21h
cmp al,0ah
jz  input_end
cmp al,0dh
jz  input_end
mov addrs[bx],al
inc bx
cmp bx,count2
jl lp
input_end: cmp al,0dh
jz  exit
cmp al,0ah
jz  exit
mov ah,7
int 21h
jmp input_end
exit:
pop ax
pop bx
endm


code    segment
main proc far
assume  cs:code,ds:data,es:data

start:
mov ax,data
mov ds,ax
mov ah,0
mov al,3
int 10h

clear
show mess1
show mess2
show mess13
show mess3
show mess4
show mess5
show mess6
show mess7
show mess8
show mess9
newline
show mess10
set_p3
w:    mov ah,7
int 21h
cmp al,'i'
jnz n1
call insert
jmp  w
n1:   cmp al,'m'
jnz  n2
call modify
jmp  w
n2:   cmp al,'d'
jnz  n3
call delete
jmp  w
n3:   cmp al,'q'
jnz  n4
call query
jmp  w
n4:   cmp  al,'c'
jnz  n5
call cot
jmp  w
n5:   cmp  al,'p'
jnz  n6
call print
jmp  w
n6:   cmp  al,'l'
jnz  n7
call list
jmp  w
n7:   cmp al,'e'
jz  exitf
jmp  w
exitf:
mov ah,4ch
int 21h
ret
main   endp

insert proc near
push ax
push bx
push cx
push dx

mov dx,offset fname
mov al,2
mov ah,3dh
int 21h
mov bx,ax
clear1
set_p1 4
call get_rec
mov cx,0               ;move file pointer to end
mov dx,0
mov al,2
mov ah,42h
int 21h

mov cx,23                    ;write file
mov dx,offset buffer1
mov ah,40h
int 21h
mov ah,3eh
int 21h
set_p3
pop dx
pop cx
pop bx
pop ax
ret
insert endp

get_rec proc near
push ax
push bx
getin buffer2,15
mov bx,0
mov  cx,15
continue:   mov al,buffer2[bx]
mov buffer1[bx],al
inc bx
loop  continue
set_p1 5
getin buffer2,2
mov al,buffer2
mov buffer1[bx],al
inc bx
mov al,buffer2+1
mov buffer1[bx],al
inc bx
set_p1 6
getin buffer2,2
mov al,buffer2
mov buffer1[bx],al
inc bx
mov al,buffer2+1
mov buffer1[bx],al
inc bx
set_p1 7
getin buffer2,2
mov al,buffer2
mov buffer1[bx],al
inc bx
mov al,buffer2+1
mov buffer1[bx],al
inc bx
set_p1 8
getin buffer2,2
mov al,buffer2
mov buffer1[bx],al
inc bx
mov al,buffer2+1
mov buffer1[bx],al
inc bx
pop bx
pop ax
ret
get_rec endp

openf proc near
mov dx,offset fname
mov al,02
mov ah,3dh
int 21h
mov handle,ax
ret
openf endp

query  proc near
push ax
push bx
push cx
push dx
clear1
clear2
mov dx,offset fname
mov al,2
mov ah,3dh
int 21h
mov bx,ax
set_p2
getin buffer1,15
lea dx,mess11
mov ah,9
int 21h
b:
mov ah,3fh
mov cx,23
mov dx,offset buffer2
int 21h
lea si,buffer2
lea di,buffer1
mov cx,15
c:
mov al,byte ptr[si]
cmp al,byte ptr[di]
jnz b
inc si
inc di
loop c
mov [buffer2+23],'$'
show_item buffer2
mov ah,3eh
int 21h
pop dx
pop cx
pop bx
pop ax
ret
query  endp

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

微机原理课程设计_学生成绩管理系统_汇编课程设计 第2页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。