Assume a PC have 3 hard disks,How to identify other hard disk ID in the BIOS boot disk's boot program.
About have many hard disk computer startup
About have many hard disk computer startup
My English is poor.
Assume a PC have 3 hard disks,How to identify other hard disk ID in the BIOS boot disk's boot program.
Assume a PC have 3 hard disks,How to identify other hard disk ID in the BIOS boot disk's boot program.
Re: About have many hard disk computer startup
Not sure I understand the question, but, if I'm guessing right you want to map disks to identifiers used by the BIOS???
If so, there's a major clue in the documentation for BIOS int 13, function 2. Here's the documentation found in my bootstrap-loader's subroutine that uses that BIOS function.
If so, there's a major clue in the documentation for BIOS int 13, function 2. Here's the documentation found in my bootstrap-loader's subroutine that uses that BIOS function.
Code: Select all
# BIOS int 13h, function 02h, Read Sector.
# Input
# AH = 02h
# AL = number of sectors to read
# CH = track/cylinder
# CL = sector
# DL = disk (00h-7Fh floppy, 80h-FFh hard disk)
# DH = head
# ES:BX = segment:offset of buffer
# Output
# CF = 0 on success, 1 on failure with AH = failure code
# AL = number of sectors read
Every universe of discourse has its logical structure --- S. K. Langer.
Re: About have many hard disk computer startup
YES,bwat wrote:Not sure I understand the question, but, if I'm guessing right you want to map disks to identifiers used by the BIOS???
If so, there's a major clue in the documentation for BIOS int 13, function 2. Here's the documentation found in my bootstrap-loader's subroutine that uses that BIOS function.
Code: Select all
# BIOS int 13h, function 02h, Read Sector. # Input # AH = 02h # AL = number of sectors to read # CH = track/cylinder # CL = sector # DL = disk (00h-7Fh floppy, 80h-FFh hard disk) # DH = head # ES:BX = segment:offset of buffer # Output # CF = 0 on success, 1 on failure with AH = failure code # AL = number of sectors read
DL = disk (00h-7Fh floppy, 80h-FFh hard disk)
BUT,How to get the other hard drive ID?
-
djmauretto
- Member

- Posts: 116
- Joined: Wed Oct 22, 2008 2:21 am
- Location: Roma,Italy
Re: About have many hard disk computer startup
0x80 Hard Disk (Boot)
0x81 Hard Disk
0x82 Hard Disk
Total 3 Hard Disk
0x81 Hard Disk
0x82 Hard Disk
Total 3 Hard Disk
Re: About have many hard disk computer startup
I want to get all disks IDbwat wrote:Not sure I understand the question, but, if I'm guessing right you want to map disks to identifiers used by the BIOS???
If so, there's a major clue in the documentation for BIOS int 13, function 2. Here's the documentation found in my bootstrap-loader's subroutine that uses that BIOS function.
Code: Select all
# BIOS int 13h, function 02h, Read Sector. # Input # AH = 02h # AL = number of sectors to read # CH = track/cylinder # CL = sector # DL = disk (00h-7Fh floppy, 80h-FFh hard disk) # DH = head # ES:BX = segment:offset of buffer # Output # CF = 0 on success, 1 on failure with AH = failure code # AL = number of sectors read
Re: About have many hard disk computer startup
For example,We set BIOS first boot disk 1,Now,We use disk 1 to boot disk 2,How to determine their own disk 2 ID,It is guided by indirect.djmauretto wrote:0x80 Hard Disk (Boot)
0x81 Hard Disk
0x82 Hard Disk
Total 3 Hard Disk
-
djmauretto
- Member

- Posts: 116
- Joined: Wed Oct 22, 2008 2:21 am
- Location: Roma,Italy
Re: About have many hard disk computer startup
For example,We set BIOS first boot disk 1,Now,We use disk 1 to boot disk 2,How to determine their own disk 2 ID,It is guided by indirect.
Code: Select all
XOR DX,DX
MOV ES,DX
MOV BX,0x7C00
MOV CX,1 ; Start Load from Sector #1
MOV DL,0x81 ; Hard Disk 2
MOV AX,0201H ; Read 1 Sector
INT 13H ; BIOS Disk
JC @Error
JMP 0x0000:0x7C00
