# # boot.i86 - constants for assembler module for DOS boot sector # # Copyright (C) 1996-2003 Gero Kuhlmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # $Id: boot.i86,v 1.1 2003/03/09 00:43:09 gkminix Exp $ # #==================================================================== # # Miscellaneous definitions # SECT_SIZE .equ 512 # sector size must be 512 bytes DISKID_FLOPPY .equ H'00 # BIOS ID of first floppy disk drive DISKID_HD .equ H'80 # BIOS ID of first hard disk drive BOOT_SPC .equ 1 # sectors per cluster BOOT_SPFAT .equ 9 # sectors per FAT BOOT_SPTRK .equ 18 # sectors per track BOOT_DIRNUM .equ 224 # number of root dir entries BOOT_SECNUM .equ 2880 # total number of sectors BOOT_FORMAT .equ H'F0 # format ID for floppy disk BOOT_ID .equ DISKID_FLOPPY # BIOS id of boot floppy disk MAX_CYLS .equ 1024 # maximum number of cylinders MAX_SECTS .equ 63 # maximum number of sectors per track MAX_HEADS .equ 256 # maximum number of heads MAX_DRIVES .equ 26 # maximum number of logical drives DPB_SIZE .equ 11 # size of disk parameter block DPB_OFFSET .equ H'0522 # offset of new disk paramter block DPB_VECT .equ H'0078 # vector address of interrupt 0x1E VOLNUM_OFS .equ H'0027 # offset to volume serial number VOLNAME_OFS .equ H'002B # offset to volume name FSNAME_OFS .equ H'0036 # offset to file system name VOLNAME_LEN .equ 11 # length of volume name FSNAME_LEN .equ 8 # length of file system name BOOT_OFFSET .equ H'7C00 # offset for boot block in segment 0 BOOT_PART_OFS .equ H'7DBE # offset to partition table BOOT_SIG_OFS .equ H'7DFE # offset of boot signature in memory BOOT_SIG_PRIV .equ H'50A0 # private boot signature BOOT_SIG .equ H'AA55 # boot signature DIR_SEG .equ H'0050 # segment where DOS expects root dir IOSYS_SEG .equ H'0070 # load segment for IO.SYS FREEDOS_SEG .equ H'0060 # load segment for KERNEL.SYS EXE_SIG .equ H'5A4D # signature of EXE type file # # Definition of BIOS parameter block as used by DOS. Note that the first # 25 bytes of the BPB are the same as in the boot sector. # BPB_SIZE .equ 36 # size of DOS BIOS parameter block BPB_BOOT_SIZE .equ 25 # size of BPB within boot sector BPB_OFFSET .equ H'000B # offset to BPB within boot sector BPB_SECTSIZE .equ H'0000 # offset to sector size BPB_SPCLUST .equ H'0002 # offset to sectors per cluster BPB_RESERVED .equ H'0003 # offset to number of reserved sectors BPB_FATNUM .equ H'0005 # offset to number of FATs BPB_DIRNUM .equ H'0006 # offset to number of root dir entries BPB_TOTSECT .equ H'0008 # offset to number of total sectors BPB_MEDIAID .equ H'000A # offset to media ID BPB_SPFAT .equ H'000B # offset to sectors per FAT BPB_SPTRACK .equ H'000D # offset to sectors per track BPB_HEADNUM .equ H'000F # offset to number of heads BPB_HIDDEN .equ H'0011 # offset to number of hidden sectors BPB_TOTSECT32 .equ H'0015 # offset to number of total sectors BPB_CYLNUM .equ H'001F # offset to number of cylinders BPB_DEVTYPE .equ H'0021 # offset to device type BPB_DEVATTR .equ H'0022 # offset to device attributes # # Definition of extended BIOS parameter block. This is only used by DOS # versions 7.0 and higher. The first 25 bytes are the same as in the # standard BPB. # BPB_EXT_SIZE .equ 53 # size of extended BPB BPB_EXT_OFS .equ H'0019 # offset to extended BPB BPB_SPFAT16 .equ H'0019 # offset to number of sectors per FAT BPB_EXTFLAGS .equ H'001D # offset to extended flags BPB_FSVERSION .equ H'001F # offset to file system version BPB_ROOTCLUST .equ H'0021 # offset to root directory cluster BPB_FSINFO .equ H'0025 # offset to FS info sector number BPB_BKUPBOOT .equ H'0027 # offset to backup boot sector number