It has come to my attention that RPM uses hard-coded 512-byte sectors.
It is not the job of the program to hard-code these (as, unfortunately, one person pointed out).
In fact, the extended int13h function 48h data offset 24(is that decimal?) provides the sector size of the hard disk.
This should be used everywhere necessary (or, best, once at the beginning of the program) to calculate disk sizes, buffer sizes, and the like.
Microsoft has warned vendors that large-sectored hard disks are coming. I think what Microsoft has planned is that the MBR will continue to be used by motherboard manufacturers for quite a while until the UEFI spec establishes itself as a standard. I was thinking that because of disk geometry and the limits of the 512-byte-sector, 32-bit LBA MBR limitation of 2TiB, Microsoft and disk manufacturers will more than likely push to use large sectors just after the 2TB disk drive, which should be the next disk coming out. the OS's that support this will be Vista and 7 according to kb articles.
If you need me to work on the source code, I can try, but since a lot of it is in assembler, I can't promise anything. I hope you used comments liberally.
Get drive parameters
Entry:
AH - 48h
DL - Drive number
DS:SI - address of result buffer.
Exit:
carry clear
AH - 0
DS:SI - address of result buffer
carry set
AH - error code
This function returns physical device parameters. It is mandatory regardless of the interface subset which is
supported. Table 3 defines the result buffer. On entry the first word of the result buffer must be the bufer length in
bytes.
...
4 Double word Number of physical cylinders. This is 1 greater than the maximum cylinder number. Use Int 13h Fn 08h to find the logical number of cylinders.
8 Double word Number of physical heads. This is 1 greater than the maximum head number. Use Int 13h Fn 08h to find the logical number of heads.
12 Double word Number of physical sectors per track. This number is the same as the maximum sector number because sector addresses are 1 based. Use Int 13h Fn 08h to find the logical number of sectors per track.
16 Quad word Number of physical sectors. This is 1 greater then the maximum sector number. If this
field is greater than 15,482,880 then word 2, bit 1 is cleared to 0.
*24 Word Number of bytes in a sector.
...
Phoenix Int13 enhanced spec. It seemed to work on the ASUS machines with old AMI BIOS I had running DOS with the diskwipe software I wrote.
I found the URL for the int13h enhanced spec pdf.
http://www.phoenix.com/NR/rdonlyres/19FEBD17-DB40-413C-A0B1-1F3F560E222F/0/specsedd30.pdf
Jim Michaels
http://jesusnjim.com/pc-repair/large-sector-drives.html
contains an in-depth article I wrote on the subject.
changed to higher priority 7
I will look at source code when I get a chance and see what I can do.
does anyone know what assembler and C compiler were used for this program?