|
|
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: 5120 (0x1400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Jeu_Simple, seg_03c3c9
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Text_Io;
use Text_Io;
with Window_Io;
use Window_Io;
package body Jeu_Simple is
task Lire_Clavier is
entry Go;
entry Meurt;
end Lire_Clavier;
task Affiche is
entry Curseur_A_Droite;
entry Curseur_A_Gauche;
end Affiche;
task body Lire_Clavier is
Item : Window_Io.Raw.Key;
Term : Window_Io.Raw.Stream_Type;
The_Char : Character := ' ';
Start : Boolean := False;
begin
loop
select
when not (Start) =>
accept Go do
Window_Io.Raw.Open (Term);
Start := True;
end Go;
or
when Start =>
delay 0.01;
Window_Io.Raw.Get (Term, Item);
The_Char := Character (Window_Io.Raw.Convert (Item));
case The_Char is
when 'q' =>
Affiche.Curseur_A_Gauche;
when 'w' =>
Affiche.Curseur_A_Droite;
when others =>
null;
end case;
or
when Start =>
accept Meurt do
Window_Io.Raw.Disconnect (Term);
Window_Io.Raw.Close (Term);
end Meurt;
exit;
end select;
end loop;
end Lire_Clavier;
task body Affiche is
My_File : Window_Io.File_Type;
begin
Window_Io.Create (File => My_File, Name => "screen");
Window_Io.Position_Cursor (File => My_File);
loop
select
accept Curseur_A_Droite do
Overwrite (My_File, "+");
end Curseur_A_Droite;
or
accept Curseur_A_Gauche do
Move_Cursor (My_File, 0, -2);
Overwrite (My_File, "^");
Move_Cursor (My_File, 0, -1);
end Curseur_A_Gauche;
or
terminate;
end select;
end loop;
end Affiche;
procedure Joue is
begin
Lire_Clavier.Go;
delay 10.0;
Lire_Clavier.Meurt;
delay 1.0;
delay 1.0;
end Joue;
end Jeu_Simple;
nblk1=4
nid=3
hdr6=6
[0x00] rec0=2a rec1=00 rec2=01 rec3=008
[0x01] rec0=24 rec1=00 rec2=04 rec3=042
[0x02] rec0=20 rec1=00 rec2=02 rec3=000
[0x03] rec0=0c rec1=00 rec2=04 rec3=000
tail 0x21534abd485a5863ffe50 0x42a00088462060003
Free Block Chain:
0x3: 0000 00 00 02 40 00 0e 20 20 20 20 20 20 20 20 20 20 ┆ @ ┆