⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 new text document.txt

📁 用汇编语言实现的程序: 每名学生需要如下描述:班级、学号、姓名、期末成绩、期中成绩、实验成绩、平时成绩。成绩可以有小数
💻 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 + -