gpt4 book ai didi

assembly - 中断 13 (ah=48) - 不工作

转载 作者:行者123 更新时间:2023-12-02 10:59:07 26 4
gpt4 key购买 nike

我想获取我的硬盘的参数。使用描述的技术here .

  • 这是显示软盘正常参数的代码:

    mov dl,00h
    mov ah,08h
    int 13h
  • 这是代码,显示无效的硬盘参数(可能是我的硬盘空间很大(LBA)):

    mov dl,80h 
    mov ah,08h
    int 13h
  • 我写了这段代码:

    mov dl,80h
    mov ah,48h
    int 13h

代码给出 cf = 1(错误)。我如何解决它?

最佳答案

出现错误时,AH 应包含错误代码。那是什么?

Ralf Brown's (excellent) interrupt list详细说明:

 00h    successful completion
01h invalid function in AH or invalid parameter
02h address mark not found
03h disk write-protected
04h sector not found/read error
05h reset failed (hard disk)
05h data did not verify correctly (TI Professional PC)
06h disk changed (floppy)
07h drive parameter activity failed (hard disk)
08h DMA overrun
09h data boundary error (attempted DMA across 64K boundary or >80h sectors)
0Ah bad sector detected (hard disk)
0Bh bad track detected (hard disk)
0Ch unsupported track or invalid media
0Dh invalid number of sectors on format (PS/2 hard disk)
0Eh control data address mark detected (hard disk)
0Fh DMA arbitration level out of range (hard disk)
10h uncorrectable CRC or ECC error on read
11h data ECC corrected (hard disk)
20h controller failure
31h no media in drive (IBM/MS INT 13 extensions)
32h incorrect drive type stored in CMOS (Compaq)
40h seek failed
80h timeout (not ready)
AAh drive not ready (hard disk)
B0h volume not locked in drive (INT 13 extensions)
B1h volume locked in drive (INT 13 extensions)
B2h volume not removable (INT 13 extensions)
B3h volume in use (INT 13 extensions)
B4h lock count exceeded (INT 13 extensions)
B5h valid eject request failed (INT 13 extensions)
B6h volume present but read protected (INT 13 extensions)
BBh undefined error (hard disk)
CCh write fault (hard disk)
E0h status register error (hard disk)
FFh sense operation failed (hard disk)
<小时/>

您也没有指定 DS:SI 的设置来接收信息。设置正确吗?

<小时/>

来自您的评论:

01h invalid function in AH or invalid parameter.

检查 INT13 扩展是否适用于您的 BIOS。 AH = 41h,DL = 80h(第一个驱动器),BX = 55AAh,INT13,如果存在扩展,则返回时进位将被清除。

关于assembly - 中断 13 (ah=48) - 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3053412/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com