|
|
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: 6144 (0x1800)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Asteroide, seg_059ab4
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Definitions;
with Text_Io;
with Serveur;
with Trajectoire;
with Imprimeur;
with Random;
package body Asteroide is
Nb_Tache : Natural := 0;
procedure Msg (Obj : in out Objet; C : in out Character) is
begin
Obj.Message (C);
end Msg;
procedure Initialise (Pos : in out Definitions.Position;
Le_Cap : out Definitions.Cap) is
T : Random.Longint;
begin
T := Random.Randomint (7);
Le_Cap := Definitions.Cap'Val (T);
T := Random.Randomint (7);
Le_Cap := Definitions.Cap'Val (T);
T := Random.Randomint (80);
Pos.Colonne := T;
T := Random.Randomint (23);
Pos.Ligne := T;
--Text_Io.Put_Line ("je suis dans initialise et mon numero est :" & Integer'Image(Num));
end Initialise;
procedure Changer_Position (Pos : in out Definitions.Position;
Le_Cap : in out Definitions.Cap) is
begin
Trajectoire.Suivre_Cap (Pos, Le_Cap);
end Changer_Position;
task body Tasteroide is
Le_Cap : Definitions.Cap;
Bidon : Character;
P, Pos : Definitions.Position;
Numero : Natural;
begin
Text_Io.Put_Line ("Tache Asteroide en route ...");
Nb_Tache := Nb_Tache + 1;
Numero := Nb_Tache;
Serveur.Serveur.Ok;
Initialise (Pos, Le_Cap);
Text_Io.Put_Line ("Tache Initialisee numero " & Integer'Image (Numero));
Imprimeur.Imprime ('*', Pos, False);
loop
P := Pos;
Serveur.Serveur.Accepter_Evenement (Pos, Numero);
Text_Io.Put_Line ("Attente de la tache " & Integer'Image (Numero));
accept Message (C : in out Character) do
Text_Io.Put_Line (" Message accepte par " &
Integer'Image (Numero));
case C is
when 'B' =>
Text_Io.Put_Line ("je bouge");
Changer_Position (Pos, Le_Cap);
Text_Io.Put_Line ("ma pos virtuelle est calculee :");
Text_Io.Put_Line (Integer'Image (Pos.Colonne) &
" , " & Integer'Image (Pos.Ligne));
Imprimeur.Imprime (' ', P, False);
Imprimeur.Imprime ('*', Pos, False);
when 'T' =>
Text_Io.Put_Line ("je me reinitialise");
Text_Io.Get (Bidon);
Initialise (Pos, Le_Cap);
--Imprimeur.Imprime ('*', Pos,false);
when others =>
null;
end case;
end Message;
delay 1.0;
end loop;
end Tasteroide;
end Asteroide;
nblk1=5
nid=5
hdr6=8
[0x00] rec0=2c rec1=00 rec2=01 rec3=042
[0x01] rec0=1f rec1=00 rec2=02 rec3=006
[0x02] rec0=1c rec1=00 rec2=03 rec3=012
[0x03] rec0=01 rec1=00 rec2=04 rec3=000
[0x04] rec0=04 rec1=00 rec2=05 rec3=000
tail 0x21768c58489107ae18005 0x42a00088462060003
Free Block Chain:
0x5: 0000 00 00 00 38 80 08 6e 64 20 6c 6f 6f 70 3b 08 00 ┆ 8 nd loop; ┆