|
|
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: 13312 (0x3400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Main, seg_04990b
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Our_String, Text_Io, Variables;
package body Main is
procedure Motor (Current_List : Our_Inst.List;
Tab : Translator.Command_Tab_Type) is
Current_Iter : Our_Inst.Iter;
Tmp_List : Our_Inst.List;
begin
--Text_Io.Put_Line ("je rentre dans motor");
Current_Iter := Our_Inst.Makelistiter (Current_List);
while Our_Inst.More (Current_Iter) loop
--Text_Io.Put_Line ("je teste la cellule");
if Our_String.Image (Current_Iter.Info.Name_Left) =
"fin_du_jeu" then
raise Fin_Du_Jeu;
elsif Our_String.Image (Current_Iter.Info.Name_Left) =
"afficher" then
Print (Current_Iter);
elsif Our_String.Image (Current_Iter.Info.Name_Left) =
"aller_a_la_ligne" then
Text_Io.Put_Line ("");
elsif Our_String.Image (Current_Iter.Info.Comp_Or_Affect) =
"egal" then
if Evaluate (Current_Iter, Tab) then
Motor (Current_Iter.Info.Pointer, Tab);
end if;
elsif Our_String.Image (Current_Iter.Info.Comp_Or_Affect) =
"vaut" then
Affect (Current_Iter);
end if;
Tmp_List := Our_Inst.Tail (Our_Inst.Makeiterlist (Current_Iter));
Current_Iter := Our_Inst.Makelistiter (Tmp_List);
end loop;
end Motor;
procedure Print (The_Iter : Our_Inst.Iter) is
begin
--Text_Io.Put_Line ("je rentre dans print");
if Our_String.Length (The_Iter.Info.Value) /= 0 then
Text_Io.Put (Our_String.Image (The_Iter.Info.Value) & " ");
elsif Our_String.Length (The_Iter.Info.Name_Right) /= 0 then
Variables.Init_Current_Variable
(Our_String.Image (The_Iter.Info.Name_Right));
if Our_String.Length (The_Iter.Info.Ext1_Right) /= 0 then
Variables.Set_Current_Variable1
(Our_String.Image (The_Iter.Info.Ext1_Right));
if Our_String.Length (The_Iter.Info.Ext2_Right) /= 0 then
Variables.Set_Current_Variable2
(Our_String.Image (The_Iter.Info.Ext2_Right));
end if;
end if;
Text_Io.Put (Variables.Get_Value & " ");
end if;
end Print;
function Evaluate (The_Iter : Our_Inst.Iter;
The_Tab : Translator.Command_Tab_Type) return Boolean is
Tmp_String : Our_String.Variable_String;
Tmp_String1 : Our_String.Variable_String;
begin
--Text_Io.Put_Line ("je rentre dans evaluate");
if Our_String.Length (The_Iter.Info.Value) /= 0 then
Our_String.Copy (Tmp_String, The_Iter.Info.Value);
elsif Our_String.Image (The_Iter.Info.Name_Left) = "entree_clavier" then
return Compare_Command (The_Iter, The_Tab);
elsif Our_String.Length (The_Iter.Info.Name_Right) /= 0 then
Variables.Init_Current_Variable
(Our_String.Image (The_Iter.Info.Name_Right));
if Our_String.Length (The_Iter.Info.Ext1_Right) /= 0 then
Variables.Set_Current_Variable1
(Our_String.Image (The_Iter.Info.Ext1_Right));
if Our_String.Length (The_Iter.Info.Ext2_Right) /= 0 then
Variables.Set_Current_Variable2
(Our_String.Image (The_Iter.Info.Ext2_Right));
end if;
end if;
Our_String.Copy (Tmp_String, Variables.Get_Value);
end if;
if Our_String.Length (The_Iter.Info.Name_Left) /= 0 then
Variables.Init_Current_Variable
(Our_String.Image (The_Iter.Info.Name_Left));
if Our_String.Length (The_Iter.Info.Ext1_Left) /= 0 then
Variables.Set_Current_Variable1
(Our_String.Image (The_Iter.Info.Ext1_Left));
if Our_String.Length (The_Iter.Info.Ext2_Left) /= 0 then
Variables.Set_Current_Variable2
(Our_String.Image (The_Iter.Info.Ext2_Left));
end if;
end if;
end if;
Our_String.Copy (Tmp_String1, Variables.Get_Value);
if Our_String.Image (Tmp_String) = Our_String.Image (Tmp_String1) then
return True;
else
return False;
end if;
end Evaluate;
procedure Affect (The_Iter : Our_Inst.Iter) is
Tmp_String : Our_String.Variable_String;
Result : Integer;
begin
--Text_Io.Put_Line ("je rentre dans affect");
if Our_String.Length (The_Iter.Info.Value) /= 0 then
Our_String.Copy (Tmp_String, The_Iter.Info.Value);
elsif Our_String.Length (The_Iter.Info.Name_Right) /= 0 then
Variables.Init_Current_Variable
(Our_String.Image (The_Iter.Info.Name_Right));
if Our_String.Length (The_Iter.Info.Ext1_Right) /= 0 then
Variables.Set_Current_Variable1
(Our_String.Image (The_Iter.Info.Ext1_Right));
if Our_String.Length (The_Iter.Info.Ext2_Right) /= 0 then
Variables.Set_Current_Variable2
(Our_String.Image (The_Iter.Info.Ext2_Right));
end if;
end if;
Our_String.Copy (Tmp_String, Variables.Get_Value);
end if;
if Our_String.Length (The_Iter.Info.Operation) /= 0 then
if Our_String.Image (The_Iter.Info.Operation) = "plus" then
Result := Integer'Value (Our_String.Image (Tmp_String)) +
Integer'Value (Our_String.Image
(The_Iter.Info.The_Integer));
elsif Our_String.Image (The_Iter.Info.Operation) = "moins" then
Result := Integer'Value (Our_String.Image (Tmp_String)) -
Integer'Value (Our_String.Image
(The_Iter.Info.The_Integer));
elsif Our_String.Image (The_Iter.Info.Operation) = "fois" then
Result := Integer'Value (Our_String.Image (Tmp_String)) *
Integer'Value (Our_String.Image
(The_Iter.Info.The_Integer));
elsif Our_String.Image (The_Iter.Info.Operation) = "divise" then
Result := Integer'Value (Our_String.Image (Tmp_String)) /
Integer'Value (Our_String.Image
(The_Iter.Info.The_Integer));
end if;
Our_String.Copy (Tmp_String, Integer'Image (Result));
end if;
if Our_String.Length (The_Iter.Info.Name_Left) /= 0 then
Variables.Init_Current_Variable
(Our_String.Image (The_Iter.Info.Name_Left));
if Our_String.Length (The_Iter.Info.Ext1_Left) /= 0 then
Variables.Set_Current_Variable1
(Our_String.Image (The_Iter.Info.Ext1_Left));
if Our_String.Length (The_Iter.Info.Ext2_Left) /= 0 then
Variables.Set_Current_Variable2
(Our_String.Image (The_Iter.Info.Ext2_Left));
end if;
end if;
end if;
Variables.Affect_Value (Our_String.Image (Tmp_String));
end Affect;
function Compare_Command
(A_Iter : Our_Inst.Iter; A_Tab : Translator.Command_Tab_Type)
return Boolean is
I : Integer;
begin
--Text_Io.Put_Line ("je rentre dans compare_command");
I := A_Tab'First;
if Our_String.Image (A_Iter.Info.Name_Right) =
Our_String.Image (A_Tab (I)) then
I := I + 1;
if Our_String.Image (A_Iter.Info.Ext1_Right) =
Our_String.Image (A_Tab (I)) then
I := I + 1;
if Our_String.Image (A_Iter.Info.Ext2_Right) =
Our_String.Image (A_Tab (I)) then
return True;
end if;
end if;
end if;
return False;
end Compare_Command;
end Main;
nblk1=c
nid=b
hdr6=12
[0x00] rec0=1c rec1=00 rec2=01 rec3=08a
[0x01] rec0=19 rec1=00 rec2=03 rec3=022
[0x02] rec0=17 rec1=00 rec2=05 rec3=076
[0x03] rec0=12 rec1=00 rec2=02 rec3=066
[0x04] rec0=19 rec1=00 rec2=08 rec3=03a
[0x05] rec0=14 rec1=00 rec2=0a rec3=062
[0x06] rec0=11 rec1=00 rec2=09 rec3=010
[0x07] rec0=19 rec1=00 rec2=06 rec3=036
[0x08] rec0=15 rec1=00 rec2=04 rec3=000
[0x09] rec0=15 rec1=00 rec2=04 rec3=000
[0x0a] rec0=0a rec1=00 rec2=0b rec3=000
[0x0b] rec0=0a rec1=00 rec2=0b rec3=000
tail 0x21546f08a865e6bceeecb 0x42a00088462060003
Free Block Chain:
0xb: 0000 00 07 00 04 80 01 4f 01 02 03 04 05 06 07 08 09 ┆ O ┆
0x7: 0000 00 0c 03 fc 80 2d 6e 67 2e 49 6d 61 67 65 20 28 ┆ -ng.Image (┆
0xc: 0000 00 00 00 12 80 0f 73 69 66 20 4f 75 72 5f 53 74 ┆ sif Our_St┆