中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-09-15 05:15
47,812 topics / 349,917 posts / today 0 new / 48,268 members
DOS开发编程 & 发展交流 (开发室) » How to use assembly to read and write large hard disks with more than 1024 cylinders? [Attention]
Printable Version  1,046 / 1
Floor1 yyuan_sh Posted 2003-06-30 00:00
初级用户 Posts 14 Credits 161
Does anyone know how to use assembly to read and write large hard disks with more than 1024 cylinders? That is, the extended int 13h function calls.
Floor2 qb45 Posted 2003-09-15 00:00
高级用户 Posts 194 Credits 677
First, thanks to ATLaS. From the website he told me about, I found detailed information on extended INT13.
Read AH=42H, write AH=43H, get disk parameters AH=48, DS:SI=packet (instead of using registers)
Related knowledge:
We know that a hard disk's capacity and sectors are determined by three values: the number of cylinders (Cylinder), the number of heads (Head), and the number of sectors (Sector), abbreviated as CHS. The ATA specification defines the interface CHS register configuration as 28bit, that is C:16bit; H:8bit; S:4bit. We should all remember the 8.4GB hard disk limit from many years ago, right? At that time, operating systems needed to access hard disks through the INT13 API interface under DOS. Although the hard disk CHS registers are 28bit, the bottleneck was the INT13 API's C:10bit; H:8bit; S:6bit. So the maximum accessible capacity was only 210×28×(26-1)=16515072 sectors. The first sector cannot be 0, so subtract 1. Each sector is 512 bytes, so the maximum capacity is 8.46 GB (hard disk manufacturers all use 1000 as the conversion unit), and that is how the 8.4 capacity limit came about.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023