Category : Pascal Source Code
Archive   : PROCES.ZIP
Filename : CHILDA.PAS

 
Output of file : CHILDA.PAS contained in archive : PROCES.ZIP
PROGRAM A;

{$I PASSDATA.TYP}
{$I GETPARAM.INC}
{$I HEX.INC}

VAR
P : ^passdata; {defined in PASSDATA.TYP}
Is_child : boolean;

PROCEDURE Passback_Status(code : integer);
BEGIN
P^.status := Code;
END;


PROCEDURE Check_If_Child;
(* ------------------------------------------------ *)
(* IF this program is running as a child process, *)
(* then there will be two valid WORDs on the *)
(* command line. Assuming we find these words, *)
(* we set a pointer to the address they define *)
(* and look for a particular "password" in that *)
(* area. IF we find it, then we have successfully *)
(* set up a shared data area with the parent. *)
(* ------------------------------------------------ *)
VAR S, O : word;
BEGIN
Get_Parameters(S,O,Is_Child); {in GETPARAM.INC}
IF Is_Child THEN
BEGIN
P := Ptr(S,O);
IF P^.password = 'BORLANDint' THEN
Passback_Status(3)
ELSE
BEGIN
WriteLn('ERROR in address');
Is_Child := false;
END;
END;
END;

{$I ERRORHAN.INC}

BEGIN
ExitProc := @ErrorHandler;
WriteLn;
WriteLn(' THIS is program A');
Check_If_Child;
IF Is_Child THEN
BEGIN
WriteLn(' The name passed from PARENT was "',P^.name,'"');
Write(' ENTER A STRING : '); ReadLn(P^.name);
Write(' ENTER AN INTEGER : '); ReadLn(P^.number);
P^.status := 1;
{status 1 = normal termination}
END;
END.


  3 Responses to “Category : Pascal Source Code
Archive   : PROCES.ZIP
Filename : CHILDA.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/