?? new text document.txt
字號:
;***********************************************************
data segment
initialscr db 'Input the students information end with # $'
nameinfo db 'Input Class IDnumber Name: ',0dh,0ah,'$'
scoreinfo db 'Input Score: ',0dh,0ah,'$'
isize dw 15
nsize dw 3
stnum db 0
stinfo db 99 dup (isize dup (0))
stscore db 99 dup (nsize dup (0))
data ends
;***********************************************************
STACKS SEGMENT
;此處輸入堆棧段代碼
STACKS ENDS
;***********************************************************
code segment
;-----------------------------------------------------------
main proc far
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax
mov es,ax
mov si,0
mov di,0
mov cx,100
lea dx,initialscr
mov ah,09
int 21h
call saveinfo
;call average
;call sort
call display
;-----------------------------------------------------------
quit:
mov ah,1
int 21h
MOV AH,4CH
INT 21H
;***********************************************************
;***********************************************************
saveinfo proc
push ax
push bx
push dx
lea dx,initialscr ;initializing screen
mov ah,09
int 21h
;mov bx,0
store:
lea dx,nameinfo ;students' information save
mov ah,09
int 21h
mov al,isize
mov stinfo[si],al
lea dx,stinfo[si]
mov ah,0ah
int 21h
mov bl,stinfo[si+1]
mov stinfo[si+isize-1],'$'
mov al,stinfo[si+2]
cmp al,'#' ;end up with #
je endup
cmp al,0dh
je over
and al,0fh
mov stinfo[bx],al
inc bx
jmp store
over:
inc stnum
add si,isize
jmp store
endup:
pop dx
pop bx
pop ax
ret
saveinfo proc
;***********************************************************
;***********************************************************
;***********************************************************
;***********************************************************
;***********************************************************
;***********************************************************
;***********************************************************
;***********************************************************
;***********************************************************
;***********************************************************
;***********************************************************
;***********************************************************
;***********************************************************
;***********************************************************
;***********************************************************
;***********************************************************
main endp
;-----------------------------------------------------------
code ends
end start
;***********************************************************
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -