Форум: "Основная";
Текущий архив: 2002.01.08;
Скачать: [xml.tar.bz2];
ВнизВопрос к паскальщикам??? Найти похожие ветки
← →
Art (2001-12-18 20:29) [8]{*========================== CONSTANTS PART ============================*}
CONST
{ program definitions }
asPurpose = "OS-MultBoot";
asVersion = "1.30";
asAuthor = "Dima Stefankov";
asCopyright = "Copyright (c) 1987, 1993";
asProgram = "OS-Boot";
asProgramPrompt = asProgram+": ";
{ exit codes }
errTerminateOK = 0;
errBootStrapDebug = 1;
errBadReadFixedDisk = 2;
errBadWriteFixedDisk = 3;
errUserInstallAbort = 4;
errUserWriteAbort = 5;
errMismatchLoaderCode = 6;
{ miscellaneous }
aMaxTpStrLen = 255;
asBlank = "";
achHexPrefix = "$";
asFreeSlot = " <*** free slot ***>";
asNonFreeSlot = " <*** disk slot ***>";
aSectorSize = 512;
aSecSizeInWords = aSectorSize DIV 2;
aQuit = "Q";
achYes = "Y";
achNo = "N";
aDefExt = "BIN";
aDosExtMark = ".";
{ ASCII codes }
achNULL = 00;
achLF = 10;
achCR = 13;
achOne = "1";
achFour = "4";
{***** ATTENTION!!! Hard-coded values below. *****}
{***** Please modify carefully! *****}
{$IFDEF DebugVersion}
adwBootSeg = $8000; { segment at 512K }
{$ELSE}
adwBootSeg = $0000; { segment at 0K }
{$ENDIF}
adwBootOfs = $7C00;
adwRelBootOfs = adwBootOfs + aSectorSize;
adwPartitionTable = $1BE;
aPartitonEntrySize = $10;
aMaxAvailLogicalPartition = 4;
adwBootMarkOfs = adwPartitionTable +
(aPartitonEntrySize*
aMaxAvailLogicalPartition);
adwBootSecID = $AA55;
aOS_Desc_Str_Len = $16; { these values found }
aOS_Desc_Ofs = $04; { after assembly of }
aOS_Desc_Start = $40-1; { IPL procedure. }
aOS_Desc_Str_Len_Ext = aOS_Desc_Str_Len + 2;
aDebugOff = 0;
aDebugOn = 1;
aFarJumpOpCode = $EA; { iAPX86 opcode }
aRomKbdDriver = $16; { IBM PC BIOS functions }
aRomDiskDriver = $13;
aRomVideoDriver = $10;
{ use for to check of installed version }
asCopyrightNotice = "OS-MultBoot (C) 1992 D.Stefankov";
{*====================== TYPED CONSTANTS PART ==========================*}
TYPE
{* strings *}
STR2 = STRING[2];
STR4 = STRING[4];
STR8 = STRING[8];
{* Information about logical disk *}
recLogicalPartition = RECORD
dbBootDriveMark : System.Byte; {00}
dbStartingHead : System.Byte; {01}
dwStartingCylSec : System.Word; {02}
dbOperatingSystemID : System.Byte; {04}
dbEndingHead : System.Byte; {05}
dwEndingCylSec : System.Word; {06}
ddPrecedingSecs : System.Longint; {08}
ddSecsPerPartition : System.Longint; {0C}
END;
{* recLogicalPartition *}
{* Master Boot Sector *}
recMasterBoot = RECORD
dbReservedCode : ARRAY[0..adwPartitionTable-1] OF
System.Byte; {000}
recDiskPartitionsTable : ARRAY[0..aMaxAvailLogicalPartition-1] OF
recLogicalPartition; {1BE}
dwValidBootRecID : System.Word; {1FE}
END;
{* recMasterBoot *}
{*=========================== VARIABLES PART ===========================*}
VAR
grecFixedDiskBoot : recMasterBoot;
gfOutStream : FILE OF recMasterBoot;
gsTempInput : STRING;
gdwOurBootRecLen : System.Word;
gdwMemOfs : System.Word;
gbStatusOk : System.Boolean;
gdbIndex : System.Byte;
gchIn : System.Char;
Страницы: 1 вся ветка
Форум: "Основная";
Текущий архив: 2002.01.08;
Скачать: [xml.tar.bz2];
Память: 0.45 MB
Время: 0.012 c