Int 13h question

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
thesame

Int 13h question

Post by thesame »

A friend asked me to post this question:
Can anyone explain me why the 13h interrupt needs a sector-number less than 13?
For example:

Code: Select all

mov ah, 0x02          
mov al, 0x08          
mov ch, 0x00           
mov cl, 0x12            ; Sector 12
mov dh, 0x00             
mov dl, 0x00
int 0x13
That code works but

Code: Select all

mov ah, 0x02          
mov al, 0x08          
mov ch, 0x00           
mov cl, 0x13            ; Sector 13
mov dh, 0x00             
mov dl, 0x00
int 0x13
causes an error (drive not ready)
ts.
Slasher

Re:Int 13h question

Post by Slasher »

hi,
0x12 is hex for 18 (1*(16^1)+2*(16^0))!!!
0x13 is therefore 19(1*(16^1)+3*(16^0))!!!

1.44 floppys have sectors from 1 to 18!!!
Post Reply