home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / msdos / programm / 11386 < prev    next >
Encoding:
Text File  |  1992-12-14  |  1.1 KB  |  45 lines

  1. Nntp-Posting-Host: dougn.byu.edu
  2. Lines: 32
  3. Distribution: inet
  4. Path: sparky!uunet!europa.asd.contel.com!gatech!news.byu.edu!news
  5. Message-ID: <|m#@byu.edu>
  6. Date: Mon, 14 Dec 92 13:01:27 MST
  7. Newsgroups: comp.os.msdos.programmer
  8. From: $dougn@sasb.byu.edu (Douglas R. Nebeker - MIS_SAS)
  9. Subject: INT 13h Help!
  10. Keywords: int 13 disk bios read
  11. Organization: Brigham Young University
  12.  
  13.  
  14. Help!
  15.  
  16. I've got an assembly routine that is trying to read a physical sector off a 
  17. hard disk using Bios Int 13h, AH=2....but it doesn't work.
  18.  
  19. I'm loading the registers as follows:
  20.  
  21. AX=0201 (I want to read 1 sector)
  22. BX=0000 (offset into segment)
  23. CX=0001 (cylinder 0, sector 1)
  24. DX=0080 (head 0, 1st hard drive)
  25. ES=segment pointer
  26.  
  27. INT 13;
  28.  
  29. What is wrong?  My program doesn't work...and if I load all the registers in 
  30. DEBUG and then try a trace through the single instruction "INT 13" that 
  31. doesn't work either.  I CAN read any sector on a floppy using the same as 
  32. above....
  33.  
  34. Also, the carry flag is never set after the operation, as it should be on a 
  35. failed disk read.
  36.  
  37.  
  38. ANY ideas??
  39.  
  40. Thanks
  41.  
  42. ____
  43.  
  44. Douglas R. Nebeker            Internet: $dougn@sasb.byu.edu    
  45.