delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/04/21/11:45:04

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: "Jacky Luk" <luckie AT netvigator DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Loading boot sector to memory
Date: Sun, 21 Apr 2002 23:34:43 +0800
Organization: IMS Netvigator
Lines: 59
Message-ID: <a9umfc$rgq3@imsp212.netvigator.com>
NNTP-Posting-Host: pcd607253.netvigator.com
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

INT 13 - DISK - READ SECTOR(S) INTO MEMORY
 AH = 02h
 AL = number of sectors to read (must be nonzero)
 CH = low eight bits of cylinder number
 CL = sector number 1-63 (bits 0-5)
      high two bits of cylinder (bits 6-7, hard disk only)
 DH = head number
 DL = drive number (bit 7 set for hard disk)
 ES:BX -> data buffer
Return: CF set on error
     if AH = 11h (corrected ECC error), AL = burst length
 CF clear if successful
 AH = status (see #00234)
 AL = number of sectors transferred (only valid if CF set for some
       BIOSes)
Notes: errors on a floppy may be due to the motor failing to spin up quickly
   enough; the read should be retried at least three times, resetting
   the disk with AH=00h between attempts
 most BIOSes support "multitrack" reads, where the value in AL
   exceeds the number of sectors remaining on the track, in which
   case any additional sectors are read beginning at sector 1 on
   the following head in the same cylinder; the MSDOS CONFIG.SYS command
   MULTITRACK (or the Novell DOS DEBLOCK=) can be used to force DOS to
   split disk accesses which would wrap across a track boundary into two
   separate calls
 the IBM AT BIOS and many other BIOSes use only the low four bits of
   DH (head number) since the WD-1003 controller which is the standard
   AT controller (and the controller that IDE emulates) only supports
   16 heads
 AWARD AT BIOS and AMI 386sx BIOS have been extended to handle more
   than 1024 cylinders by placing bits 10 and 11 of the cylinder number
   into bits 6 and 7 of DH
 under Windows95, a volume must be locked (see INT 21/AX=440Dh/CX=084Bh)
   in order to perform direct accesses such as INT 13h reads and writes
 all versions of MS-DOS (including v7 [Win95]) have a bug which prevents
   booting on hard disks with 256 heads, so many modern BIOSes provide
   mappings with at most 255 heads
SeeAlso: AH=03h,AH=0Ah,AH=06h"V10DISK.SYS",AH=21h"PS/1",AH=42h"IBM"
SeeAlso: INT 21/AX=440Dh/CX=084Bh,INT 4D/AH=02h

According to the above, how do you setup the registers for loading boot
sector to memory (GAS or GCC)?

--
================================
Always wear a grin on your face :)
Ha ha ha ha ha.... ha ha ha ha ha... ha ha ha ha

Mr. Jacky Luk
(ª±±o¿³®v³Å)

ICQ:140681957
Messenger:luckiejacky AT hotmail DOT com
http://home.netvigator.com/~luckie
luckie AT netvigator DOT com
luckiejacky AT hotmail DOT com



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019