|
|
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, procedure Write_To_Port16, seg_042695
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Device_Independent_Io;
with Io;
with System;
with Terminal_Specific;
with Text_Io;
with Unchecked_Conversion;
procedure Write_To_Port16 is
package Dio renames Device_Independent_Io;
package Ts renames Terminal_Specific;
package Tio renames Text_Io;
subtype Bs is System.Byte_String;
package My_Int is new Text_Io.Integer_Io (Num => System.Byte);
F_Out : Ts.File_Type;
F_In : Ts.File_Type;
Buf : System.Byte_String (1 .. 10);
B : System.Byte;
Cnt : Natural;
Beep_3 : constant Bs := (16#01#, 16#03#, 16#00#, 16#01#,
16#2C#, 16#F1#, 16#F2#);
Beep_4 : constant Bs := (16#01#, 16#04#, 16#00#, 16#01#,
16#2C#, 16#F1#, 16#F2#);
Site_00 : constant Bs := (16#01#, 16#03#, 16#00#, 16#04#, 16#27#,
16#00#, 16#00#, 16#00#, 16#F1#, 16#F2#);
Horloge_00 : constant Bs := (16#01#, 16#03#, 16#00#, 16#04#, 16#23#,
16#00#, 16#00#, 16#00#, 16#F1#, 16#F2#);
Rapport_Site : constant Bs :=
(16#01#, 16#03#, 16#00#, 16#01#, 16#28#, 16#F1#, 16#F2#);
Rapport_Horloge : constant Bs :=
(16#01#, 16#03#, 16#00#, 16#01#, 16#24#, 16#F1#, 16#F2#);
Rapport_Evenement : constant Bs :=
(16#01#, 16#03#, 16#00#, 16#01#, 16#1D#, 16#F1#, 16#F2#);
Rapport_Carte_Invalide : constant Bs :=
(16#01#, 16#03#, 16#00#, 16#01#, 16#29#, 16#F1#, 16#F2#);
Etoile : constant Bs := (1 => 42);
begin
Dio.Open (File => F_In,
Mode => Dio.In_File,
Name => "!machine.devices.terminal_16",
Form => "");
Ts.Input.Set_Echo (File => F_In, Echo => False);
Ts.Input.Set_Editing (File => F_In, Mode => "None");
--Ts.Input.Flush (F_In);
Dio.Open (File => F_Out,
Mode => Dio.Out_File,
Name => "!machine.devices.terminal_16", Form => "");
-- Dio.Write (File => F_Out, Item => Horloge_00);
-- delay 1.0;
-- Dio.Write (File => F_Out, Item => Site_00);
-- delay 1.0;
Dio.Write (File => F_Out, Item => Rapport_Horloge);
-- delay 1.0;
Dio.Read (F_In, B);
Text_Io.Put ("heure : ");
My_Int.Put (Item => B, Base => 16);
Text_Io.Put_Line (" ---> " & Natural'Image (Natural (B)));
while (Natural (B) /= 242) loop
Dio.Read (F_In, B);
My_Int.Put (Item => B, Base => 16);
Text_Io.Put_Line (" ---> " & Natural'Image (Natural (B)));
end loop;
Text_Io.Put_Line ("");
-- Dio.Write (File => F_Out, Item => Rapport_Site);
--delay 1.0;
-- Dio.Write (File => F_Out, Item => Beep_3);
-- delay 1.0;
Dio.Write (File => F_Out, Item => Rapport_Evenement);
Dio.Read (F_In, B);
Text_Io.Put ("evenement : ");
My_Int.Put (Item => B, Base => 16);
Text_Io.Put_Line (" ---> " & Natural'Image (Natural (B)));
while (Natural (B) /= 242) loop
Dio.Read (F_In, B);
My_Int.Put (Item => B, Base => 16);
Text_Io.Put_Line (" ---> " & Natural'Image (Natural (B)));
end loop;
Text_Io.Put_Line ("");
--Text_Io.Put_Line ("evenement: " & Natural'Image (Natural (B)));
Dio.Write (File => F_Out, Item => Rapport_Carte_Invalide);
Dio.Read (F_In, B);
Text_Io.Put ("cartes invalides : ");
My_Int.Put (Item => B, Base => 16);
Text_Io.Put_Line (" ---> " & Natural'Image (Natural (B)));
while (Natural (B) /= 242) loop
Dio.Read (F_In, B);
My_Int.Put (Item => B, Base => 16);
Text_Io.Put_Line (" ---> " & Natural'Image (Natural (B)));
end loop;
Text_Io.Put_Line ("");
Dio.Close (File => F_Out);
-- for I in 1 .. 100 loop
-- Dio.Read (F_In, B);
-- Text_Io.Put_Line ("cnt =>" & Natural'Image (Natural (B)));
-- end loop;
Dio.Close (File => F_In);
end Write_To_Port16;
nblk1=5
nid=0
hdr6=a
[0x00] rec0=23 rec1=00 rec2=01 rec3=07e
[0x01] rec0=1f rec1=00 rec2=03 rec3=002
[0x02] rec0=05 rec1=00 rec2=02 rec3=00c
[0x03] rec0=25 rec1=00 rec2=05 rec3=024
[0x04] rec0=27 rec1=00 rec2=04 rec3=000
tail 0x2173f00f6860786953370 0x42a00088462060003