Home
Top.Mail.Ru Yandeks.Metrika
Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Down

Question to pascalshchik ??? Find similar branches


Art   (2001-12-18 17:19) [0]

The compiler gives the error Variable Indefinier Expected, and points to a place in the program where two constants are multiplied ??? What's the matter ???



Владислав   (2001-12-18 17:20) [1]

Variable Indefinier Expected means: Expected variable identifier.

Draw conclusions.

Give the code.



Art   (2001-12-18 17:23) [2]

System.Move (grecFixedDiskBoot, gsTempInput [1], aMaxTpStrLen);
gsTempInput [0]: = System.Char (aMaxTpStrLen);
IF (System.Pos (asCopyrightNotice, gsTempInput) <> 0)
THEN BEGIN
System.WriteLn (asProgramPrompt + asProgram +
"loader found on fixed disk 0.");
System.Write (asProgramPrompt +
"Copy description strings from installed copy (Y / N):");
System.ReadLn (gsTempInput);

IF (System.UpCase (_fnchGetFirstChar (gsTempInput)) <> achNo)
THEN BEGIN
System.WriteLn (asProgramPrompt + "Copy description strings.");
System.Move (System.Mem [System.Seg (grecFixedDiskBoot.dbReservedCode):
(System.Ofs (grecFixedDiskBoot.dbReservedCode) + aOS_Desc_Start)],
(“This casts constants here) aOS_Desc_Str_Len_Ext * aMaxAvailLogicalPartition);
END;
{if-then}
END
ELSE
System.WriteLn (asProgramPrompt + asProgram + "loader not present.");
{if-then}



Владислав   (2001-12-18 17:26) [3]

Declare a variable. Give it meaning. Pass in the procedure.
Most likely, the procedure expects a parameter by reference, and you pass by value.



MBo   (2001-12-18 18:40) [4]

Do you need a colon there?



Иван Шихалев   (2001-12-18 18:52) [5]

What the hell is the colon? We take a textbook for junior classes and begin to figure out the difference between the parameter values ​​and the parameter variables. It is still useful to look into the help and find out what the parameters of the procedure Move and how many of them.



Anatoly Podgoretsky   (2001-12-18 20:06) [6]

It seems to me that the problem is here
"(" Does this call constants here) "is this variable? and where is the comma then?
And since the syntax is otherwise correct.
Give the exact call code and variable declaration used in the Move procedure.



Art   (2001-12-18 20:22) [7]

Guys, I already tortured, right now I will give all the code!



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 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;





Anatoly Podgoretsky   (2001-12-18 20:30) [9]

It’s better to start with this, but you don’t need all the code, only for move and the necessary variable declarations.



Art   (2001-12-18 20:33) [10]

System.Move (grecFixedDiskBoot, gsTempInput [1], aMaxTpStrLen);
gsTempInput [0]: = System.Char (aMaxTpStrLen); - this line, he skips all the parameters mean!



Art   (2001-12-18 20:39) [11]

Move from SYSUTILS module



Anatoly Podgoretsky   (2001-12-18 20:54) [12]

So which of the two Move does the compiler swear at you?
Well, do not pull the same information from you drop by drop, soon get bored.



Иван Шихалев   (2001-12-18 21:06) [13]

> he skips this line means all options!

System.Move (grecFixedDiskBoot, gsTempInput [1], aMaxTpStrLen);

Here are three parameters

System.Move (System.Mem [System.Seg (grecFixedDiskBoot.dbReservedCode): (System.Ofs (grecFixedDiskBoot.dbReservedCode) + aOS_Desc_Start)], aOS_Desc_Str_Len_Ext * aMaxAvailLogicalPartition);

Here are two parameters

> Move from SYSUTILS module

What does that mean?



Art   (2001-12-18 21:07) [14]

Move from SYSUTILS module



Art   (2001-12-18 21:10) [15]

Okay hammer on the module!
System.Move (System.Mem [System.Seg (grecFixedDiskBoot.dbReservedCode): (System.Ofs (grecFixedDiskBoot.dbReservedCode) + aOS_Desc_Start)],

aOS_Desc_Str_Len_Ext * aMaxAvailLogicalPartition); - swears at this piece!



Art   (2001-12-18 21:12) [16]

People! It will be easier for everyone, if someone knows the thread, where to get the source of the loader !!



Anatoly Podgoretsky   (2001-12-19 00:05) [17]

It would be necessary that there were not two, but three parameters !!!



Владислав   (2001-12-19 07:44) [18]

> Art © (18.12.01 21: 12)

It will be easier if you do not "stir up the water" :-)

Here is the declaration of the procedure:
procedure Move (const Source; var Dest; Count: Integer);

But how do you use it:
System.Move (System.Mem [System.Seg (grecFixedDiskBoot.dbReservedCode): (System.Ofs (grecFixedDiskBoot.dbReservedCode) +

Find differences...

It will be easier for everyone if someone knows where to get the source of the bootloader!

"Please give me some water to drink, otherwise you want to eat that even there is no place to sleep."

Good luck.



Арт   (2001-12-19 13:47) [19]

Okay, sorry, thanks everyone!



Pages: 1 whole branch

Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Top









Memory: 0.63 MB
Time: 0.065 c
1-22009
oomneeq
2001-12-14 21:26
2002.01.08
Circular class reference


1-22169
Kreo
2001-12-20 21:16
2002.01.08
Files and access


1-22248
Leviathan
2001-12-17 13:07
2002.01.08
Delphi mocks !!!


3-21914
Axel
2001-12-03 18:05
2002.01.08
Question on MIDAS.


14-22322
Dense
2001-11-03 14:10
2002.01.08
Who will do? It is useful to all.





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian Japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Español swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish