Menu

How can read a sector of HDD?

2008-10-28
2013-06-04
  • Nobody/Anonymous

    mov ah, 2
    mov al, 1            ; How many?
    mov ch, 0            ; Cylinder
    mov cl, 2         ; Sector
    mov dh, 0            ; Head
    mov dl, 0                 ; Drive
    int 0x13
    ----------------------------------------------
    This reads 2th sector of Floppy.

    If HDD, the following is the code?
    (I wish to read 64th sector of HDD.)

    mov ah, 2
    mov al, 1           
    mov ch, 0           
    mov cl, 64           
    mov dh, 0           
    mov dl, 80           
    int 0x13

     
    • Nobody/Anonymous

      1. Your code is CHS code - obsolete (OK for obsolete floppy).
      2. Address where to read ?
      3. OS ? EXE type ? Your "code" will work only from RM in DOS or raw ... maybe also DPMI, but sure not in Linux :-D
      4. This looks like a beginners question, not example code :-(

       
    • Nobody/Anonymous

      Sorry

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.