Outils pour utilisateurs

Outils du site


back2root:ibm-pc-ms-dos:interrupts:int_13:start

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
back2root:ibm-pc-ms-dos:interrupts:int_13:start [2023/01/17 21:59] fraterback2root:ibm-pc-ms-dos:interrupts:int_13:start [2023/01/19 21:49] (Version actuelle) – [Interruption 13h - Disks - WIP] frater
Ligne 2: Ligne 2:
  
 <nspages -h1 -simpleList -exclude:start -TextPages=""> <nspages -h1 -simpleList -exclude:start -TextPages="">
 +
 +
 +----
 +
 +
 +{{anchor:note1}}
 +[1] : The 1983 version of the "IBM XT BIOS Technical Reference" shows these functions are available for the XT but many other programming references say they aren't available until the AT. 
 +This is probably due to misunderstanding the design of the disk BIOS. Upon bootup the hard disk BIOS replaces the default INT 13h diskette handler with the hard disk INT 13h handler.
 +
 +
 +=== Most disk BIOS calls use the following parameter scheme: ===
 +
 +^ reg  ^ description ^
 +|AH    | function request number|
 +|AL    | number of sectors  (1-128 dec.)|
 +|CH    | cylinder number  (0-1023 dec.)|
 +|CL    | sector number (1-17 dec.)|
 +|DH    | head number  (0-15 dec.)|
 +|DL    | drive number (0=A:, 1=2nd floppy, 80h=drive 0, 81h=drive 1)|
 +|DL    | drive number (0=A:, 1=2nd floppy, 80h=C:, 81h=D:)\\ Note that some programming references use (0-3) as the drive number which represents diskettes only.|
 +|ES:BX | address of user buffer|
 +
 +
 +=== and return with: ===
 +
 +| CF | 0 if successful \\ 1 if error |
 +| AH | status of operation  (see [[back2root:ibm-pc-ms-dos:interrupts:int_13:int_13_01|INT 13,01]])|
 +
 +<WRAP round box>
 +  * INT 13 diskette read functions should be retried at least 3 times to assure the disk motor has time to spin up to speed
 +  * physical sector numbers can be converted to and from DOS sector numbers with the following formulas:
 +
 +<WRAP center round tip 75%>
 +<m 15>DosSector = (sector - 1) + (head * SectorsPerTrack) + (track * SectorsPerTrack * NumHeads)</m>
 +</WRAP>
 +<WRAP center round tip 75%>
 +<m 15>PhysicalSector = 1 + (DosSector  MOD  SectorsPerTrack)</m>
 +</WRAP>
 +<WRAP center round tip 75%>
 +<m 15>PhysicalHead = (DosSector / SectorsPerTrack)  MOD  NumHeads</m>
 +</WRAP>
 +<WRAP center round tip 75%>
 +<m 15>PhysicalTrack = DosSector / (SectorsPerTrack * NumHeads)</m>
 +</WRAP>
  
 [[back2root:ibm-pc-ms-dos:interrupts:|Back]] [[back2root:ibm-pc-ms-dos:interrupts:|Back]]
  
back2root/ibm-pc-ms-dos/interrupts/int_13/start.1673989162.txt.gz · Dernière modification : 2023/01/17 21:59 de frater