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

📄 99_cclib_gb2312.asm

📁 汇编语言 参考书 包含作业与答案 从入门到精通 通俗易懂
💻 ASM
字号:
		.model small
		.stack 100h
		.data	
				file_cclib	db	'd:\dos\cclib\hzk16',0
				handle		dw	?				;文件句柄
				file_buff	db	32 DUP(?),'$'
				msg_err1	db	'File open wrong!','$'
				msg_err2	db	'File read wrong!','$'
		.code
		.startup
start:
		mov ax,@data
		mov ds,ax
		
		lea	dx,file_cclib
		mov	al,0
		mov	ah,3dh
		INT	21h
		jc	error1
		mov	handle,ax		
		
		mov bx,handle
		mov	cx,0
		mov	dx,0b040h
		mov	al,00h
		mov	ah,42h
		INT	21h
		
		mov	bx,handle
		mov cx,32
		lea	dx,file_buff
		mov	ah,3fh
		INT	21h
		jc	error2
		
close:
		mov	bx,handle
		mov	ah,3eh
		INT	21h
		jmp	done
		
error1:
		lea	dx,msg_err1
		mov	ah,9h
		INT	21h
		jmp	done

error2:
		lea	dx,msg_err2
		mov ah,9h
		INT 21h
		jmp	done

done:	
		.exit
		end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -