用户登录  |  用户注册
首 页商业源码原创产品编程论坛
当前位置:PB创新网文章中心信息化信息技术

如何测试软硬盘驱动器参数

减小字体 增大字体 作者:佚名  来源:本站整理  发布时间:2009-01-10 15:18:14
ID(80h,81h)
;Output: CF= 0 successfully
;AX= Fdisk size(Hex)
;CX= Number of Cylinders
:DL= Number of Sectors
;DH= Number of Heads
;CF= 1 failed
;-------------
Get-Fdiskparamproc near
cmp al,80h ;test Fdisk ID
jb Get-FdiskExit
mov cx,cs
mov ds,cx
mov es,cx ;set DS,ES segment
mov dl,al ;Fdisk ID
mov bx,offset Partition-area
mov cx,1
mov dh,0
mov ax,201h ;read partition sector
int 13h
jb Get-FdiskExit ;failed to exit.
mov bx,offset Partiton-area+1beh
mov al,[bx+8] ;Sector counter
mov ah,[bx+5] ;Head counter
mov dl,[bx+7] ;cylinder lower
mov dh,[bx+6] ;cylinder high
mov cx,6
shr dh,cl
inc dx ;get cylinder
push dx ;save cylinder
push ax ;save head & sector
mul ah ;compute Fdisk size
mul dx
mov cx,11
Loop-shift:
shr dx,1
rcr ax,1
loop Loop-shift ;Get Fdisk size
pop dx ;sectors & heads
pop cx ;cylinder counter
clc ;clear CF flag
Get-FdiskExit:
retn
Get-FdiskParamendp
Partition-area db 512 dup(0) ;read Partition buffer

上一页  [1] [2] 

Tags:

作者:佚名

文章评论评论内容只代表网友观点,与本站立场无关!

   评论摘要(共 0 条,得分 0 分,平均 0 分) 查看完整评论
PB创新网ourmis.com】Copyright © 2000-2009 . All Rights Reserved .
页面执行时间:43,890.63000 毫秒
Email:ourmis@126.com QQ:2322888 蜀ICP备05006790号