• 实用debug命令集锦


    实用debug命令集锦

    1. 非物理0磁道坏软盘的修复 

    此种损坏从软盘盘面上来看并没有明显的划伤和霉变。一般可以恢复其数据,也可是软盘重新在利用。 
    处理方法如下: 
    ⅰ. 进入debug 
    ⅱ. 取一张引导区没有损坏的好磁盘,插入软驱 
    -l 100 0 0 1 
    ⅲ. 插入损坏的磁盘到软驱 
    -w 100 0 0 1 
    -q 
    注意:好盘与坏盘容量必须相同 


    2. 物理0磁道坏软盘中的数据读取 

      对于0磁道损坏的磁盘,一般来说是应该抛弃了,当你也不妨试一试已下方法: 
    磁化处理:用较强的磁铁在靠近坏磁盘的表面处反复移动,切不可碰到磁盘介质,以免划伤表面,然后在试试格式化。 
    软盘换面:小心的将磁盘打开,坚磁片与金属芯片分开,方面后再按原来的方法粘在一起即可,在重新格式化。 
    diskfix:对于diskfix想必大家都用的比较多了,里面的磁盘修复功能很好用的。能修复大多数磁盘表面错误。 


    3. 硬盘启动失败处理 

      在正常机上格式化一张软盘,无其它数据 
    进入debug 
    -l 0 2 0 1 
    -w 0 0 0 1 
    -q 
    用系统盘启动故障机后 
    在进入debug 
    -l 0 0 0 1 
    -w 0 2 0 1 
    -q 


    4. 软盘不能正确读取解决方法 

      如果使用软盘时出现如下提示 
    general failure error reading drive a 
    可以用以下方法解决: 
    将一张好盘插入软驱 
    进入debug 
    -a 100 
    ****:*100 mov al,0 
    ****:**** mov cx,1 
    ****:**** mov dx,0 
    ****:**** mov bx,1000 
    ****:**** int 25 
    ****:**** int 20 
    回车 
    -g=0100 

    插入坏盘并进入debug 
    -a 200 
    ****:*100 mov al,1 
    ****:**** mov cx,1 
    ****:**** mov dx,0 
    ****:**** mov bx,1000 
    ****:**** int 26 
    ****:**** int 20 
    回车 
    -g=200 


    5. cmos 数据的保存,恢复 

    cmosram的’地址口’的口地址为 70h ’数据口’的口地址为 71h 读取时只需将读的cmosram的地址送到70h,随后就可以从71 h中得到所需数据。 

    (1)读取cmos数据 进入debug 
    -a 100 
    ****:*100 mov bx,1000 
    ****:**** mov cx,0040 
    ****:**** mov ax,0000 
    ****:0109 mov dx,cx 
    ****:**** mov cx,0005 
    ****:010e loop 010e 
    ****:**** out 70,al 
    ****:**** mov cx,0005 
    ****:0115 loop 0115 
    ****:**** in al,71 
    ****:**** mov 【bx】,al 
    ****:**** cmp ah,0e 
    ****:**** jb 0123 
    ****:**** add ah,80 
    ****:0123 inc ah 
    ****:**** inc bx 
    ****:**** mov cx,dx 
    ****:**** mov al,ah 
    ****:**** loop 0109 
    ****:**** mov ah,3c 
    ****:**** mov dx,0150 
    ****:**** mov cx,0020 
    ****:**** int 21 
    ****:**** mov bx,ax 
    ****:**** mov dx,1000 
    ****:**** mov cx,0040 
    ****:**** mov ah,40 
    ****:**** int 21 
    ****:**** mov ah,4c 
    ****:**** int 21 
    -a 150 
    ****:0150 db "cmos.dat",0 
    ****:0159 
    -r cx 
    cx 0000 
    :60 
    -n save cmos.com 
    -w 
    -q 
    -w 100 2 0 1 
    -q 

    (2)恢复cmos数据 进入debug 
    -a 100 
    ****:*100 mov cx,0150 
    ****:**** mov ah,3d 
    ****:**** mov al,00 
    ****:**** int 21 
    ****:**** mov dx,1000 
    ****:**** mov bx,ax 
    ****:**** mov cx,0040 
    ****:**** mov ah,3f 
    ****:**** int 21 
    ****:**** mov ax,0000 
    ****:**** mov bx,dx 
    ****:**** mov dx,cx 
    ****:**** mov cx,0005 
    ****:**** loop 011f 
    ****:**** mov al,ah 
    ****:**** out 70,al 
    ****:**** mov cx,0005 
    ****:**** loop 0128 
    ****:**** mov al,【bx】 
    ****:**** out 71,al 
    ****:**** jb 0136 
    ****:**** add ah,80 
    ****:**** inc ah 
    ****:**** inc bx 
    ****:**** mov cx,dx 
    ****:**** loop 011a 
    ****:**** mov ax,0040 
    ****:**** mov ds,ax 
    ****:**** mov ax,1234 
    ****:**** mov 【0072】,ax 
    ****:**** jmp ffff:0000 
    -a 150 
    ****:0150 db "cmos.dat",0 
    ****:0159 
    -r cx 
    cx 0000 
    :60 
    -n write cmos.com 
    -w 
    -q 


    6. dos 引导扇区数据的保存与恢复  

    dos引导程序是被读到内存0000:7c00初开始执行的 
    获得正常的引导程序 
    进入debug 
    -l 100 2 0 1 
    -n a:dosboot.com 
    -r cx 
    :200 
    -w 
    -q 

    装入引导程序 
    进入debug 
    -n a:dosboot.com 
    -l 
    -r cx 
    :200 
    -w 100 2 0 1 
    -q 


    7. 硬盘主引导扇区数据的保存与恢复 

    硬盘工作正常时读取主引导扇区信息 
    注意:当分区改变时不能用此数据恢复 
    保存主引导扇区数据进入debug 
    -a 100 
    mov ax,0201 
    mov bx,0110 
    mov cx,0001 
    mov dx,0080 
    int 13 
    int 3 
    -g=100 
    -e 102 3 
    -e 10e c3 
    -r bx 
    bx 0110 
    :0 
    -r cx 
    cx 0001 
    :210 
    -n a:rboot.com 
    -w 
    -q 

    恢复主引导扇区数据:只需运行a盘的rboot.com 


    8. 硬盘非分配表备份与恢复 

    计算机运行正常时分配表备份 
    进入debug 
    -l 100 2 0 1 
    -n a:dbrup.dat 
    -r cx 
    :200 
    -w 

    恢复 
    进入debug 
    -n a:dbrup.dat 
    -l 
    -w 100 2 0 1 
    -q 


    9. 硬盘保护卡内幕 

    对于经常在外边上机的人来说,计算机维护人员一旦设置硬盘保护卡,自己作一些事来特别麻烦,想不想屏蔽掉硬盘保护卡,用以下方法或许可以借鉴: 
    进入debug 
    -a 100 
    mov ah,0 
    mov dl,0 
    int 13 
    -t 
    一直按t知道找到 cs=f000 记下此时 ds 的值 如:1234 
    -e e0:4c 
    34 12 00 f0 
    -q 


    10. 用debuf作硬盘低级格式化 

    硬盘低级格式化一般用dm,但debug也可以低级格式化硬盘 
    进入debug 
    -a 100 
    mov ax,500 
    mov bx,180 
    mov cx,0 
    mov dx,80 
    int 13 
    int 3 
    -e 180 0 0 0 2 
    -q 


    11. 冷启动与热启动 

    用debug实现系统冷启动与热启动程序 

    冷启动: 
    -a 100 
    jmp ffff:0 
    int 20 
    -n a:reset.com 
    -r cx 
    :0007 
    -w 
    -q 

    热启动: 
    -a 100 
    mov ax,0040 
    mov ds,ax 
    mov ax,1234 
    mov si,0072 
    mov (si),ax 
    jmp ffff:0 
    -n a:rset.com 
    -r cx 
    :0014 
    -w 
    -q 


    12. dos内部命令加密 

    如加密 dir 
    用pctools或diskedit找 c:下的command.com文件 
    编辑该文件 
    pctools中:f-----f1 然后找所有03 44 49 52 找到后按f5修改成你所要的值 如: foo 以后只有输入foo 才能列出文件或文件目录。 
    diskfix 有良好的界面,操作起来和pctools差不多。 
    注意:如果不能修改,则解开文件的锁定 luck 
    其它命令代码 
    type 04 54 59 50 45 
    cd 02 43 44 
    del 03 44 45 44 
    copy 04 43 49 50 59
  • 相关阅读:
    Selenium2+python自动化20-Excel数据参数化【转载】
    linux下安装jdk
    linux下的tomcat自动退出的问题
    操作笔记:tomcat在正式环境的常见问题和idea的远程调试
    Maven 的41种骨架
    ant风格是什么?
    tomcat 页面管理
    操作笔记:linux下查看端口被占用
    操作笔记:linux下安装ftp
    linux下的mysql乱码问题
  • 原文地址:https://www.cnblogs.com/analyzer/p/1669973.html
Copyright © 2020-2023  润新知