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.