版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
mov PgSize,12
mov cur,200callgetline
callopenf
or ax,ax
jnz disy
mov dx,offsetmess_err2mov ah,09h
int 21h
jmp file_enddisy:
mov cx,PgSizeshow_page:
callread_blockor ax,ax
jnz next2
mov dx,offsetmess_err3mov ah,09h
int 21h
jmp file_endnext2:
callshow_block
or bx,bx
jz file_end
or cx,cx
jnz show_page
mov dx,offsetmess_starmov ah,09h
int 21h
wait_space:
mov ah,1
int 21h
cmp al,''
jnz psize
jmp disypsize:
cmp al,'p'
jnz wait_spacecallchange_psize
here:
mov ah,1
int 21h
cmp al,''
jnz here
jmp disyfile_end:
mov ah,4ch
int 21h
main endp
;
change_psizeprocnearpush ax
push bx
push cx
push dx
mov dx,offsetmess_psizemov ah,09h
int 21h
mov ah,01
int 21h
cmp al,0dh
jz illeg
sub al,'0'
mov cl,algetp:
mov ah,1
int 21h
cmp al,0dh
jz pgot
sub al,'0'
mov dl,al
mov al,cl
mov cl,dl
mov bl,10
mul bl
add cl,al
jmp getpPgot:
mov dl,0ah
mov ah,2
int 21h
cmp cx,0
illeg:
jle illeg
cmp cx,24
jg illeg
mov PgSize,cx
mov dl,0ah
mov ah,2
int 21h
pop dx
pop cx
pop bx
pop axret
change_psizeendp
;
openf procnearpush bx
push cx
push dx
mov dx,offsetbuf
mov al,0
mov ah,3dh
int 21h
mov handle,ax
mov ax,1
jnc ok
mov ax,0
ok:
pop dx
pop cx
pop bxret
openf endp
;
getline procnearpush ax
push bx
push cx
push dx
mov dx,offsetmess_getnamemov ah,09h
int 21h
mov dx,offsetbuf_size
mov ah,0ah
int 21h
mov dx,offsetcrlf
mov ah,09h
int 21h
mov bl,s_buf
mov bh,0
mov [buf+bx],0
pop dx
pop cx
pop bx
pop axret
getline endp
;
read_block procnearpush bx
push cx
push dx
cmp cur,200
jnz back
mov cx,200
mov bx,handle
mov dx,offsetbuf
mov ah,3fh
int 21h
mov cur,0
mov ax,1
jnc back
mov cur,200
mov ax,0back:
pop dx
pop cx
pop bxret
read_block endp
;
show_block procnearpush ax
push dx
mov bx,curloop1:
cmp bx,200
jl lp
jmp exit
lp:
mov dl,buf[bx]
;cmp dl,1ah
cmp dl,0;实验指导书本来是上面注释掉的那一句。
;如果要读的是二进制文件(比如.lib)就用注释掉的那一句,如果读的是文本文件(比
如.txt)就用这一句,不然停不下来。
jz exit_eof
inc bx
inc cur
mov ah,02
int 21h
cmp dl,0ah
jz exit_ln
jmp loop1exit_eof:
mov bx,0exit_ln:
dec cx
exit:
pop dx
pop axret
show_block endp
;
code ends
;********************************************************************
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 【正版授权】 IEC 60747-5-2:1997/AMD1:2002 EN-FR Amendment 1 - Discrete semiconductor devices and integrated circuits - Part 5-2: Optoelectronic devices - Essential ratings and characteristics
- 【正版授权】 IEC 60747-14-5:2010 EN-FR Semiconductor devices - Part 14-5: Semiconductor sensors - PN-junction semiconductor temperature sensor
- 【正版授权】 IEC 60734:2012 EN-FR Household electrical appliances - Performance - Water for testing
- 【正版授权】 IEC 60730-2-3:2006 EN-FR Automatic electrical controls for household and similar use - Part 2-3: Particular requirements for thermal protectors for ballasts for tubular fluorescent la
- 【正版授权】 IEC 60728-11:2010 EN Cable networks for television signals,sound signals and interactive services - Part 11: Safety
- 【正版授权】 IEC 60704-2-3:2017 EN-FR Household and similar electrical appliances - Test code for the determination of airborne acoustical noise - Part 2-3: Particular requirements for dishwashers
- 【正版授权】 IEC 60695-11-2:2017 EN-FR Fire hazard testing - Part 11-2: Test flames - 1 kW pre-mixed flame - Apparatus,confirmatory test arrangement and guidance
- 【正版授权】 IEC 60683:2011 EN-FR Industrial electroheating equipment - Test methods for submerged-arc furnaces
- 【正版授权】 IEC 60637:1979 EN-FR Marking of and accompanying documents for X-ray tubes and X-ray tube assemblies for medical use
- 【正版授权】 IEC 60512-19-3:1997 EN-FR Electromechanical components for electronic equipment - Basic testing procedures and measuring methods - Part 19: Chemical resistance tests - Section 3: Test
- 2023年上海市高中合格考生物试题
- 山东2024年山东青年政治学院招聘4人(辅导员)笔试上岸历年典型考题与考点剖析附带答案详解
- 2024年初中地理热点
- 2024年河北出版传媒集团有限责任公司招聘笔试冲刺题(带答案解析)
- 江苏省南京市六校联合体2022-2023学年高一下学期期末联考生物试题(解析版)
- 《初中生物分层作业设计策略》研究方案
- 企业应收账款管理问题研究-以海尔公司为例
- DZT 0222-2006 地质灾害防治工程监理规范(正式版)
- 2024国网陕西电力省管产业单位供电服务业务部招聘(379人)高频考题难、易错点模拟试题(共500题)附带答案详解
- 2024年湖北襄阳市法院系统招聘雇员制审判辅助137人历年公开引进高层次人才和急需紧缺人才笔试参考题库(共500题)答案详解版
- 悦己人生-大学生心理健康智慧树知到期末考试答案章节答案2024年哈尔滨工业大学
评论
0/150
提交评论