home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / dos_ency / section5 / int25h.asm < prev    next >
Encoding:
Assembly Source File  |  1988-08-11  |  1.2 KB  |  28 lines

  1. ;***************************************************************;
  2. ;                                                               ;
  3. ;      Interrupt 25H: Absolute Disk Read                        ;
  4. ;                                                               ;
  5. ;      Read logical sector 1 of drive A into the memory area    ;
  6. ;      named buff. (On most MS-DOS floppy disks, this sector    ;
  7. ;      contains the beginning of the file allocation table.)    ;
  8. ;                                                               ;
  9. ;***************************************************************;
  10.  
  11.         mov     al,0            ; Drive A.
  12.         mov     cx,1            ; Number of sectors.
  13.         mov     dx,1            ; Beginning sector number.
  14.         mov     bx,seg buff     ; Address of buffer.
  15.         mov     ds,bx
  16.         mov     bx,offset buff
  17.         int     25h             ; Request disk read.
  18.         jc      error           ; Jump if read failed.
  19.         add     sp, 2           ; Clear stack.
  20.         .
  21.         .
  22.         .
  23. error:                          ; Error routine goes here.
  24.         .
  25.         .
  26.         .
  27. buff    db      512 dup (?)
  28.