苏州工业园区建设网站软件开发工程师太累了
2026/5/18 20:24:31 网站建设 项目流程
苏州工业园区建设网站,软件开发工程师太累了,wordpress菜单美化插件,酒店网站建设描述概述#xff1a;Windows 95 的长文件名给我们带来了很大的方便#xff0c;本文讲述有关长文件名的使用方法。长文件名的使用涉及到几个中断#xff0c;在使用中#xff0c;原先 DOS 中 INT 21H 的中断中参数有 ASC 文件名的地方#xff0c;都有一个新的中断对应#xff0…概述Windows 95 的长文件名给我们带来了很大的方便本文讲述有关长文件名的使用方法。长文件名的使用涉及到几个中断在使用中原先 DOS 中 INT 21H 的中断中参数有 ASC 文件名的地方都有一个新的中断对应如 INT 21H 的 3DH6CH 对应 716CH 打开/建立文件56H 对应 7156H文件改名41H 对应 7141H文件删除等等其他参数中没有 ASC 文件名的则使用原来的中断如 3EH3FH40H 关闭/读/写等等一般编程中先检测系统是否支持长文件名如果支持则用新功能打开文件再用普通的 3EH3FH40H 等对文件进行操作。本文中有几个例子是用长文件名建立一个文件写入一段文字再打开文件、改名然后删除大家可以对应中断说明分析一下。本程序要用到的 INT 21H 中断的 71xxH 功能如下INT 21H 中断的 716CH 功能打开或建立文件输入参数AX 716ChBX 存取模式和共享标志Bit(s) Description2-0 file access mode000 read-only001 write-only010 read-write100 read-only, do not modify files last-access time6-4 file sharing modes7 no-inherit flag8 do not buffer data (requires that all reads/writes be exact physicalsectors)9 do not compress file even if volume normally compresses files10 use alias hint in DI as numeric tail for short-name alias12-11 unused??? (0)13 return error code instead of generating INT 24h if critical errorCX 文件属性DX 执行方式Bit(s) Description (Table 01758)0 open file (fail if file does not exist)1 truncate file if it already exists (fail if file does not exist)4 create new file if file does not already exist (fail if exists)Note: the only valid combinations of multiple flags are bits 40 and 41DS:SI - ASC 码文件名DI 转化成短文件名后面加的编号返回参数CF 清除则成功AX file handleCX action taken0001h file opened0002h file created0003h file replacedCF 置位则失败AX 7100H 则表示功能不被支持返回参数CF 清除则成功INT 21H 中断的 7156H 功能文件改名输入参数AX 7156hDS:DX - 原来的 ASC 码文件名ES:DI - 新的 ASC 码文件名返回参数CF 清除则成功CF 置位则失败AX 7100H 则表示功能不被支持INT 21H 中断的 7141H 功能文件删除输入参数AX 7141hDS:DX - ASC 码文件名SI 属性及是否支持通配符0000h 不支持通配符忽略属性0001h 支持通配符CL 属性CH must-match attributes返回参数CF 清除则成功CF 置位则失败AX 7100H 则表示功能不被支持源程序;长文件名示例之一建立文件 This is a test file.txt写入一句文字再关闭code segmentassume cs:code,ds:codeorg 100hstart:jmp start1file_name db This is a test file.txt,0d_text db Sample text,0dh,0ahd_text_end equ this byted_error db Create file error !,0dh,0ah,24hstart1:mov ax,716chmov bx,2 ;Read and writexor cx,cx ;Normal attribmov dx,0010h ;Create new filemov si,offset file_namexor di,diint 21hjb errormov bx,axmov ah,40hmov cx,offset d_text_end - offset d_textmov dx,offset d_textint 21hmov ah,3ehint 21hint 20herror:mov ah,9mov dx,offset d_errorint 21hint 20hcode endsend start;长文件名示例之二打开文件 This is a test file.txt显示文件内容再关闭code segmentassume cs:code,ds:codeorg 100hstart:jmp start1file_name db This is a test file.txt,0buffer db 13 dup (0),0dh,0ah,24hd_error db Open file error !,0dh,0ah,24hstart1:mov ax,716chmov bx,2 ;Read and writexor cx,cx ;Normal attribmov dx,1 ;Open filemov si,offset file_namemov di,1int 21hjb errormov bx,axmov ah,3fhmov dx,offset buffermov cx,13int 21hmov ah,9mov dx,offset bufferint 21hmov ah,3ehint 21hint 20herror:mov ah,9mov dx,offset d_errorint 21hint 20hcode endsend start;长文件名示例之三把文件 This is a test file.txt 改名到 This is another file name.txtcode segmentassume cs:code,ds:codeorg 100hstart:jmp start1file_name db This is a test file.txt,0new_name db This is another file name.txt,0d_error db Rename file error !,0dh,0ah,24hstart1:mov ax,7156hmov dx,offset file_namemov di,offset new_nameint 21hjb errorint 20herror:mov ah,9mov dx,offset d_errorint 21hint 20hcode endsend start;长文件名示例之四把文件 This is another file name.txt 删除code segmentassume cs:code,ds:codeorg 100hstart:jmp start1file_name db This is another file name.txt,0d_error db Delete file error !,0dh,0ah,24hstart1:mov ax,7141hmov dx,offset file_namexor si,sixor cx,cxint 21hjb errorint 20herror:mov ah,9mov dx,offset d_errorint 21hint 20hcode endsend start

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询