|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 7168 (0x1c00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Initialize_Cross_Compilers, seg_0064a4
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Debug_Tools;
with Error_Reporting;
with Io;
with Program;
with Simple_Status;
with String_Utilities;
with System_Utilities;
procedure Initialize_Cross_Compilers is
File_Name : constant String := "!Machine.Cross_Compilers";
File : Io.File_Type;
procedure Close is
begin
Io.Close (File);
exception
when others =>
null;
end Close;
function Get_First_Token (From : String) return String is
begin
for Index in From'Range loop
if From (Index) = ' ' then
return From (From'First .. Index - 1);
end if;
end loop;
return From;
end Get_First_Token;
function Get_Remainder (From : String) return String is
begin
for Index in From'Range loop
if From (Index) = ' ' then
return From (Index + 1 .. From'Last);
end if;
end loop;
return "";
end Get_Remainder;
procedure Start_Compiler (Target_Entry : String) is
Target_Name : constant String := Get_First_Token (Target_Entry);
Params : constant String := Get_Remainder (Target_Entry);
Caller : constant String :=
"!Machine.Initialize_Cross_Compilers." & Target_Name;
Context : constant String := "!Targets.Implementation.";
Routine : constant String := "Start_Compiler";
Activity : constant String := "!Machine.Release.Current.Activity";
Job_Id : Program.Job_Id;
Status : Program.Condition;
procedure Await_Elaboration is
begin
if not Program.Started_Successfully (Status) then
Error_Reporting.Report_Error
(Caller => Caller,
Reason => Error_Reporting.Create_Condition_Name
("Unable to start compiler",
Error_Reporting.Problem),
Explanation => Simple_Status.Display_Message (Status));
end if;
for I in 1 .. 100 loop
begin
declare
Name : constant String :=
System_Utilities.Job_Name (Job_Id);
begin
if Name'First =
String_Utilities.Locate (Fragment => Target_Name,
Within => Name,
Ignore_Case => True) then
return;
end if;
delay 5.0;
end;
exception
when others =>
Error_Reporting.Report_Error
(Caller => Caller,
Reason => Error_Reporting.Create_Condition_Name
("Cannot get compiler job name",
Error_Reporting.Problem),
Explanation =>
Debug_Tools.Get_Exception_Name (True, True));
return;
end;
end loop;
Error_Reporting.Report_Error
(Caller => Caller,
Reason => Error_Reporting.Create_Condition_Name
("Compiler has not changed its name",
Error_Reporting.Problem),
Explanation => "");
end Await_Elaboration;
begin
if String_Utilities.Locate ("Motorola_68k", Target_Name) /= 0 then
-- with Common, Control, Stream, the Start_Compiler procedure
-- does not return until all components are started.
Program.Run (Program.Current (Subsystem => Context & Target_Name,
Unit => Routine,
Parameters => Params,
Activity => Activity));
else
Program.Create_Job
(Program.Current (Subsystem => Context & Target_Name,
Unit => Routine,
Activity => Activity),
Job_Id,
Status);
Await_Elaboration;
end if;
exception
when others =>
Error_Reporting.Report_Error
(Caller => Caller,
Reason => Error_Reporting.Create_Condition_Name
("Unhandled_Exception", Error_Reporting.Problem),
Explanation => Debug_Tools.Get_Exception_Name (True, True));
end Start_Compiler;
begin
begin
Io.Open (File => File, Mode => Io.In_File, Name => File_Name);
exception
when Io.Name_Error =>
-- file does not exist
return;
end;
begin
loop
Start_Compiler (String_Utilities.Strip_Leading
(Filler => ' ', From => Io.Get_Line (File)));
end loop;
exception
when Io.End_Error =>
Close;
end;
exception
when others =>
Close;
raise;
end Initialize_Cross_Compilers;
nblk1=6
nid=0
hdr6=c
[0x00] rec0=29 rec1=00 rec2=01 rec3=004
[0x01] rec0=16 rec1=00 rec2=02 rec3=06c
[0x02] rec0=17 rec1=00 rec2=03 rec3=01e
[0x03] rec0=14 rec1=00 rec2=04 rec3=02e
[0x04] rec0=18 rec1=00 rec2=05 rec3=02e
[0x05] rec0=13 rec1=00 rec2=06 rec3=000
tail 0x21701d76681bfa4c6492c 0x42a00088462060003