INT13H(非扩展型)是否能够访问每个气缸具有16个以上磁头的驱动器? [英] Is INT13H (non extended) capable of accessing drives with more than 16 heads per cylinder?

查看:97
本文介绍了INT13H(非扩展型)是否能够访问每个气缸具有16个以上磁头的驱动器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道您需要INT 13H扩展功能才能访问8GB以上的驱动器.该问题涉及标准INT 13H,功能02H.

I know that you need the INT 13H extended functions to access drives over 8GB in size. This question refers to standard INT 13H, function 02H.

我还知道旧的504MB硬盘驱动器限制是由于以下原因造成的: 1024个柱面x 16个磁头x 63个扇区x 512字节= 528,482,304字节

I also know the old 504MB hard drive limit was a result of: 1024 cylinders x 16 heads x 63 sectors x 512 bytes = 528,482,304 bytes.

但是这种硬盘驱动器限制是由Int 13h本身引起的吗? 当头编号有一个完整的空格(dh)字节时,头编号被限制为16是否有任何特殊原因?显然,后来对标准进行了更改,以允许头数最多为255(导致8GB的限制)

But was this hard drive limitation caused by Int 13h itself? Is there any particular reason the head number was limited to 16 when there is an entire byte of space (dh) for the head number? Obviously later on the standard was changed to allow head numbers up to 255 (which caused the 8GB limit)

我问的原因是因为我在读取一个 进入硬盘有很大的距离.它在磁盘中的容量超过3 GB.

The reason i'm asking is because i'm having trouble reading a sector that lies quite a ways into a hard disk. It lies over 3 gigabytes into the disk.

其精确的C/H/S偏移量是:485缸,缸盖147,扇区47

Its exact C/H/S offset is: Cylinder 485, Head 147, sector 47

我用来尝试读取的代码如下:

And the code i'm using to attempt to read it is as follows:

mov bx, ds
mov es, bx        ;es takes ds
lea bx, secBuff   ;bx takes the offset of secBuff, a 512 byte buffer
mov ah, 2         ;function 2, read sectors
mov dl, 80h       ;source drive set to master drive
mov ch, 0e5h      ;lower 8 bits of cylinder number
mov dh, 93h       ;head number
mov cl, 6fh       ;upper 2 bits of cylinder number, 6 bit sector number
int 13h           ;read the sector into ds:secBuff

我知道第二个分区的引导扇区位于此C/H/S,我已经使用磁盘编辑程序对它进行了四倍检查,但是并没有将引导扇区加载到secBuff中,而是将其填充了用零.

I know for a fact that the boot sector of the second partition lies at this C/H/S, i've quadruple checked using a disk editing program, but instead of loading the boot sector into secBuff, it just gets filled with zeros.

INT 13H在执行后将错误代码返回到AH.它返回的代码为00h,这意味着就其而言,加载成功.

INT 13H returns an error code into AH after execution. The code it returns is 00h, which means that as far as it's concerned, the load was successful.

INT 13H是否可以处理大于16的磁头号?或者仅仅是无法访问超出驱动器的前504MB甚至2GB的扇区?

Can INT 13H handle head numbers greater than 16, or is it simply unable to access sectors that lie beyond the first 504MB, or maybe even 2GB of the drive?

推荐答案

(本文回答了所问的问题.我还没有检查过荒谬的长评论线程是否添加了应该包含在问题中的任何相关信息. )

(This post answers the question as asked. I haven't checked to see if absurdly long comment thread added any pertinent information that should have been incorporated into the question.)

取决于BIOS,INT 13h CHS BIOS功能是否能够寻址位于16或更高编号的磁头上的扇区.最早的BIOS实现不提供任何CHS值转换,直接将圆柱体号,磁头号和扇区号直接通过未经修改的驱动器接口传递.这些BIOS实现不支持16磁头以上的驱动器,因为标准的IBM PC AT控制器WD-1003仅支持16磁头.由于IDE CHS接口与WD-1003向后兼容,因此该限制也适用于(仅)支持CHS寻址的所有IDE驱动器.

Whether the INT 13h CHS BIOS functions are capable of addressing sectors located on heads numbered 16 or higher depends on the BIOS. The oldest BIOS implementations don't provide any translation of CHS values, passing the cylinder, head and sector numbers directly through the drive interface unmodified. These BIOS implementations don't support drives with more than 16 heads because the standard IBM PC AT controller, the WD-1003, only supported 16 heads. Since the IDE CHS interface is backwards compatible with the WD-1003, this limit also applies to any IDE drive that (only) supports CHS addressing.

较新的BIOS将执行某种转换,但是所使用的转换并不一致.现代BIOS将使用BIOS报告的模拟几何将通过INT 13h传递的CHS值转换为LBA地址,并使用驱动器报告的几何(如果驱动器不支持LBA寻址)将其转换回CHS值.但是,还使用了其他转换方案(例如,使用head值的高两位扩展圆柱值).而且,即使使用了现在的标准CHS/LBA/CHS转换,不同的BIOS实现也可以使用不同的仿真几何体.同一驱动器.

Newer BIOSes will do some sort of translation, but what translation used hasn't been consistent. Modern BIOSes will convert the CHS values passed through the INT 13h into an LBA address using the emulated geometry reported by the BIOS and (if the drive doesn't support LBA addressing) back into CHS values using the geometry reported by the drive. However other translation schemes have been used (eg. using the upper two bits of the head value to extend the cylinder value.) Also even when the now standard CHS/LBA/CHS translation used, different BIOS implementations can use different emulated geometries for the same drive.

如果您的BIOS不使用现代的CHS/LBA/CHS转换,则您需要弄清楚它使用的转换是什么.如果您的BIOS确实使用它,并且您已在使用不同模拟几何的计算机之间(甚至可能在同一PC上的控制器之间)移动了驱动器,则存储在驱动器中(例如,在分区表或FAT中)的所有CHS值BPB)不再有效,您将不得不忽略它们或弄清楚如何翻译它们.存储在磁盘上的LBA值通常不会引起问题,因为无论模拟几何体如何,这些值都保持不变.

If your BIOS doesn't use the modern CHS/LBA/CHS translation then you'll need to figure out what translation it does use. If your BIOS does use it and you've moved the drive between computers (or even potentially between controllers on the same PC) that use different emulated geometries then any CHS values stored in on the drive (eg. in the partition table, or FAT BPB) are no longer valid and you'll have to either ignore them or figure out how translate them. LBA values stored on the disk won't normally cause a problem as these remain the same regardless of emulated geometry.

有一份全面的文档,标题为工作原理-CHS翻译, Hale Landis描述了较旧的BIOS如何执行CHS转换,比我上面提供的还要详细.特别是,它描述了10种不同的BIOS类型,可帮助您识别计算机可能使用的翻译方案.请注意,该文档非常老,因此它所谈论的有关实际操作系统的大部分内容都已过时.

There's a comprehensive document titled How It Works -- CHS Translation by Hale Landis that describes how older BIOSes perform CHS translation in more detail than I've given above. In particular it describes 10 different BIOS types that may help identify what translation scheme your computer might be using. Note that this document is pretty old, so much of what it talks about actual operating systems doing is out of date.

这篇关于INT13H(非扩展型)是否能够访问每个气缸具有16个以上磁头的驱动器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆