一段读出来的MBR,求解几个问题

GR 2005-07-16 08:00:35
xor cx, cx ; 清除cx内容
seg000:005C mov ss, cx ; 把CX存入SS寄存器
seg000:005E assume ss:seg000
seg000:005E mov sp, 7BF4h ; ss与SEG000段关联,作为段寄存器,SEG000就是本段段地址,SP存入地址7BEE4H
seg000:0061 mov es, cx ; cx = 0 ,所以ES = 0
seg000:0063 assume es:seg000
seg000:0063 mov ds, cx ; DATA XREF: seg000:00DEr
seg000:0065 assume ds:seg000
seg000:0065 mov bp, 7C00h ; bp = 0x7c00h
seg000:0068 mov [bp+2], cl ;
seg000:006B mov dl, [bp+40h] ;
seg000:006E mov ah, 8 ;
seg000:0070 int 13h ;


这里int 13h,ah为什么会等于8?怎么也找不到入口等于8的信息
...全文
91 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
zara 2005-07-16
  • 打赏
  • 举报
回复
Returns various parameters for the specified drive. On the PC and
PC/XT, this function is supported on fixed disks only.

The value returned in register DL reflects the true number of
physical drives attached to the adapter for the requested drive.

Input Output

AH = 08h If function successful
DL = Drive Carry flag: clear
= 00h-7Fh floppy disk BL = Drive type
= 80h-FFh fixed disk (PC/AT and PS/2 floppy disks)
01h (if 360K, 40 track, 5.25")
02h (if 1.2 megabytes,
80 track, 5.25")
03h (if 720K, 80 track, 3.5")
04h (if 1.44 megabytes,
80 track, 3.5")
CH = Low 8 bits of maximum cylinder
number
CL = Bits 6-7 High-order 2 bits of
maximum cylinder number
= Bits 0-5 Maximum sector number
DH = Maximum head number
DL = Number of drives
ES:DI = segment:offset of disk drive
parameter table

If function unsuccessful
Carry flag: Set
AH = Status
See: Int 13h Function 01h
ahjoe 2005-07-16
  • 打赏
  • 举报
回复
GET DRIVE PARAMETERS

AH = 08h (function number for get drive params).
DL = drive number (same as with READ/WRITE SECTORS).

This function will return with CF=0 if the drive is valid. I've read somewhere that not all BIOS's correctly sets/clear CF. When you attempt to detect the installed harddisks, you could check the number of attached drives returned in DL, when you've checked the first disk with DL=80h.

This function returns the "maximum" CHS parameters in the same registers as they are passed to INT13 in, with functions 02h and 03h.

CH[0-7] and CL[6-7] returns the maximum cylinder value, not count! (less or equal to 1023).
CL[0-5] maximum sector number, since sector numbers are one-based this is also count of sectors.
DH returns the maximum head number (0-255, again, this is the number of heads - 1).

Notes:

It is common to exclude the last cylinder from the information returned by this functions. On IBM PCs this cylinder used to be reserved as a "manufacturer diagnostics cylinder". If you're writing an OS or a partitioning utility, you might want to leave it as an option to the user to include this cylinder in a partition. Make sure your utility does a read/write/verify on the cylinder before attempting to use it.

21,458

社区成员

发帖
与我相关
我的任务
社区描述
汇编语言(Assembly Language)是任何一种用于电子计算机、微处理器、微控制器或其他可编程器件的低级语言,亦称为符号语言。
社区管理员
  • 汇编语言
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧