Converting Drive Letters to MS-DOS INT 13H Disk Drive Numbers
来源:互联网 发布:mac 删除多个文件 编辑:程序博客网 时间:2024/05/16 15:55
original url from : https://support.microsoft.com/en-us/kb/62571
SUMMARY
MORE INFORMATION
- Identify the block device with Interrupt 21H IOCTL function 44H, subfunction 0dH, minor code 60H (Get Device Parameters), as either a floppy disk drive or a hard disk drive by checking the returned parameter block "device type" field byte at offset +1. A value of 0-4 or 7 indicates that it is a floppy disk drive. A value of 5 indicates that it is a hard disk drive.
- If the device is a floppy disk drive, subtract 1 from the BL drive number input to the function Get Device Parameters to make it zero based, or take the uppercase ASCII logical drive letter and subtract the value of "A". For example:
Drive letter "A" - "A" = 0, "B" - "A" = 1, and so on
- If the device is a hard disk drive, you need to interpret the hard disk partition table to differentiate between a primary partition and a logical partition because the ordering of logical drive numbers does not necessarily reflect the physical order and corresponding BIOS physical drive number.
For more information, query on the following keywords:prod(msdos) and driver.sys and orderOnce you know how MS-DOS assigns logical drive letters on system initialization, you need to address the correct physical hard disk and compute the offset (starting sector number) of any logical drive by using the starting sector values supplied in the hard disk's partition table. These starting sector numbers would be supplied to the BIOS Int 13H function to access those sectors representing a logical drive. "Advanced MS-DOS Programming" by Ray Duncan has more information on the boot record and partition tables.Example ------- HD 1: Bios# 80H HD 2: Bios# 81H HD X: Bios# X... C: (primary) E: (logical) ----------- ----------- D: (logical) F: (logical)
To access logical drive D, address HD 1: Bios# 80H, but sectors starting at logical partition D:.
磁盘号 80H 指的是第一块硬盘, 如果用U盘做boot loader实验, 在MBR代码中, 80H指的就是U盘自己.
0 0
- Converting Drive Letters to MS-DOS INT 13H Disk Drive Numbers
- HDU_4788_Hard Disk Drive(打表)(13成都现场H题)
- HDU4788 Hard Disk Drive
- HDU - 4788 Hard Disk Drive (成都邀请赛H 水题)
- 2013 Chengdu Regional H - Hard Disk Drive解题报告
- Monitor physical Disk Drive Performance
- hdu 4788 Hard Disk Drive
- hdu 4788 Hard Disk Drive
- HDOJ 4788 Hard Disk Drive
- HDU-#4788 Hard Disk Drive
- HDU-4788-Hard Disk Drive
- hdu 4788 Hard Disk Drive
- hdu 4788 Hard Disk Drive
- HDU 4788 Hard Disk Drive
- HDU 4788 Hard Disk Drive
- hdu 4788 Hard Disk Drive
- hdu 4788 Hard Disk Drive
- HDU 4788 Hard Disk Drive
- Block 两个界面之间传值
- 单例模式与单例工厂
- json 动态生成
- JavaScript中作用域的学习笔记
- Java基础学习总结----数据类型和运算符
- Converting Drive Letters to MS-DOS INT 13H Disk Drive Numbers
- leetcode | Add Binary
- mac下redis的安装
- Slidemenu(侧滑)的使用(三种使用方式)及属性详解
- Avd Manager在创建AVD时,使用的究竟是哪里的img?
- Android SharedPreferences Storage
- Git 创建版本库
- C++ 学习记录之静态变量static
- 数据库概论小结