HD with more than 1023 cylinder
HD with more than 1023 cylinder
I am trying to use teh INT 13 AH=42 to read a sector of a hard disk that have more than 1023 cylinders but this service
returns an error at AH=01 and don't read the sectors! What can i make?
returns an error at AH=01 and don't read the sectors! What can i make?
Re: HD with more than 1023 cylinder
??? The function INT 13h/AH=42h does not use cylinders, it's for LBA addressing mode. Besides, error code 1 (returned AH=1) is:JamesBond wrote:I am trying to use teh INT 13 AH=42 to read a sector of a hard disk that have more than 1023 cylinders but this service
returns an error at AH=01 and don't read the sectors! What can i make?
Have you checked that your drive supports extended read function? Do you provide a valid pointer in DS:SI? Does your disk address packet contain valid values (number of sectors reasonable and buffer pointer valid)?01h invalid function in AH or invalid parameter
Re: HD with more than 1023 cylinder
I think that address pack may have an error but how check if teh drive support INT 13h AH=42h ?turdus wrote:JamesBond wrote:I am trying to use teh INT 13 AH=42 to read a sector of a hard disk that have more than 1023 cylinders but this service
returns an error at AH=01 and don't read the sectors! What can i make?Have you checked that your drive supports extended read function? Do you provide a valid pointer in DS:SI? Does your disk address packet contain valid values (number of sectors reasonable and buffer pointer valid)?
-
- Member
- Posts: 116
- Joined: Wed Oct 22, 2008 2:21 am
- Location: Roma,Italy
Re: HD with more than 1023 cylinder
JamesBond wrote: I think that address pack may have an error but how check if teh drive support INT 13h AH=42h ?
Code: Select all
MOV AX,4100H ; EDD INSTALLATION CHECK
MOV BX,55AAH
MOV DL,[Boot_Drive]
INT 13H
JC @Not_Supported
CMP BX,0AA55H
JNZ @Not_Supported
TEST CX,1
JZ @Not_Supported
- Griwes
- Member
- Posts: 374
- Joined: Sat Jul 30, 2011 10:07 am
- Libera.chat IRC: Griwes
- Location: Wrocław/Racibórz, Poland
- Contact:
Re: HD with more than 1023 cylinder
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
Re: HD with more than 1023 cylinder
I already check if the drive supports extended read function and the drive supports extended read function but the INT 13 extended read function still return an error! How to read/write disk sectors without use interrupts only using I/O ports?
- Griwes
- Member
- Posts: 374
- Joined: Sat Jul 30, 2011 10:07 am
- Libera.chat IRC: Griwes
- Location: Wrocław/Racibórz, Poland
- Contact:
Re: HD with more than 1023 cylinder
Could you *please* post that code of yours that happens to result in error? I've lost my crystal ball somewhere.
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
Re: HD with more than 1023 cylinder
here is part of the code:
Where is the error at the code above?
Code: Select all
mov ah,42
mov dl,80
mov si,200
INT 13
disk address packet = 1000010300100000000000
-
- Member
- Posts: 116
- Joined: Wed Oct 22, 2008 2:21 am
- Location: Roma,Italy
Re: HD with more than 1023 cylinder
The Numbers are decimal instead of HexadecimalGriwes wrote:Where is the error at the code above?
Re: HD with more than 1023 cylinder
No! All the numbers are hexadecimaldjmauretto wrote:The Numbers are decimal instead of HexadecimalGriwes wrote:Where is the error at the code above?
- Griwes
- Member
- Posts: 374
- Joined: Sat Jul 30, 2011 10:07 am
- Libera.chat IRC: Griwes
- Location: Wrocław/Racibórz, Poland
- Contact:
Re: HD with more than 1023 cylinder
No, to be hexadecimal, they would have to have 0x prefix, or h suffix
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
Re: HD with more than 1023 cylinder
No! No! No! because my assembler don't need the h suffix not even teh 0x prefixGriwes wrote:No, to be hexadecimal, they would have to have 0x prefix, or h suffix
Re: HD with more than 1023 cylinder
Which assembler would that be? It seems to use a non-standard syntax.
And how do you tell it when you do want to specify a decimal number?
And how do you tell it when you do want to specify a decimal number?
Re: HD with more than 1023 cylinder
The assembler is created by me! This assembler use only hexadecimal numbers!iansjack wrote:Which assembler would that be? It seems to use a non-standard syntax.
And how do you tell it when you do want to specify a decimal number?
Re: HD with more than 1023 cylinder
You've probably pinpointed your problem there. Try comparing the generated code with that from a mainline assembler.JamesBond wrote:The assembler is created by me!
You might also want to check that DAP. It looks all wrong to me; for starters, the first byte shouldn't be zero.