Article View: comp.os.msdos.programmer
Article #5641Reading Bootsector with BIOS
From: Rene Wenzel Schmidt
Date: Fri, 05 Apr 1991 11:40
Date: Fri, 05 Apr 1991 11:40
21 lines
1254 bytes
1254 bytes
I'm currently writing a program where I need to read the boot-
sector without using DOS calls.
So instead I'm using INT 13h subfunction: AH=02h: Read Sectors
Into Memory.
The following code works fine, if I try to read the bootsector
of drive A: (dl=00h), but I can't read the bootsector of my
harddisk (dl=80h), instead I get the logical sector 3100h. Why?
...
; DL = Physical Drive Number
mov ax,0201h ; Read One Sector
mov dh,00h ; Side 0
mov cx,0001h ; Track 0, Sector 1
mov bx,offset BoSec ; Store address
int 13h ; Execute function
...
I'm running DOS 4.1 with a 49MB SCSI harddisk, with one big partion
(16 bit FAT), and I will be very pleased if someone could help me!
Technical Details
Message-ID:
<1991Apr5.114028.25003@daimi.aau.dk>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!dkuug!daimi!sunnyShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!dkuug!daimi!sunny From: sunny@daimi.aau.dk (Rene Wenzel Schmidt) Newsgroups: comp.os.msdos.programmer Subject: Reading Bootsector with BIOS Message-ID: <1991Apr5.114028.25003@daimi.aau.dk> Date: 5 Apr 91 11:40:28 GMT Sender: sunny@daimi.aau.dk (Rene Wenzel Schmidt) Organization: DAIMI: Computer Science Department, Aarhus University, Denmark Lines: 21