|
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 - download
Length: 8192 (0x2000) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Com_Cl35_Bis, seg_04f689
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
with Port_Serie_68k; with Buffer; package body Com_Cl35_Bis is package Ps is new Port_Serie_68k; Entete_Trame : constant G_D.Byte := 16#01#; Fin_Trame_1 : constant G_D.Byte := 16#F1#; Fin_Trame_2 : constant G_D.Byte := 16#F2#; Taille_Max_Chaine : constant Natural := 250; Port : Ps.Port := Ps.Port_A; type T_Chaine is record Taille : Natural := 0; Chaine : G_D.Byte_String (1 .. Taille_Max_Chaine); end record; procedure Envoi_Trame (Bs : G_D.Byte_String); procedure Reception_Trame (C : in out T_Chaine); task Tache_Com_Cl35 is entry Emission (Bs : G_D.Byte_String); entry Reception (C : in out T_Chaine); entry Qq_Chose_A_Lire (B : in out Boolean); end Tache_Com_Cl35; task body Tache_Com_Cl35 is C : T_Chaine; begin Ps.Emission_Reception (Port_Serie => Port, Mode => Ps.E_R); loop select accept Emission (Bs : G_D.Byte_String) do Envoi_Trame (Bs); end Emission; or accept Reception (C : in out T_Chaine) do Reception_Trame (C); end Reception; or accept Qq_Chose_A_Lire (B : in out Boolean) do B := Ps.Pret_Pour_Lire (Port); end Qq_Chose_A_Lire; or terminate; end select; end loop; end Tache_Com_Cl35; procedure Ecriture (Bs : G_D.Byte_String) is begin Tache_Com_Cl35.Emission (Bs); end Ecriture; function Lecture return G_D.Byte_String is C : T_Chaine; begin Tache_Com_Cl35.Reception (C); return C.Chaine (1 .. C.Taille); end Lecture; procedure Envoi_Byte (B : G_D.Byte) is begin --Text_Io.Put_Line (Natural'Image (G_D.Byte'Pos (B))); Ps.Ecrire_Donnee (Port_Serie => Port, Donnee => B); end Envoi_Byte; procedure Envoi_Trame (Bs : G_D.Byte_String) is begin Envoi_Byte (Entete_Trame); for I in Bs'Range loop Envoi_Byte (Bs (I)); end loop; Envoi_Byte (Fin_Trame_1); Envoi_Byte (Fin_Trame_2); end Envoi_Trame; function Reception_Byte return G_D.Byte is begin return Ps.Lire_Donnee (Port); end Reception_Byte; procedure Reception_Trame (C : in out T_Chaine) is B1, B2 : G_D.Byte; Taille : Natural := 0; Bs : G_D.Byte_String (1 .. Taille_Max_Chaine); begin if G_D.Byte'Pos (Reception_Byte) = G_D.Byte'Pos (Entete_Trame) then B1 := Reception_Byte; B2 := Reception_Byte; while G_D.Byte'Pos (B1) /= G_D.Byte'Pos (Fin_Trame_1) or G_D.Byte'Pos (B2) /= G_D.Byte'Pos (Fin_Trame_2) loop Taille := Taille + 1; if Taille > Taille_Max_Chaine then raise Trame_Cl35_Error; end if; Bs (Taille) := B1; B1 := B2; B2 := Reception_Byte; end loop; C := (Taille => Taille, Chaine => Bs); else raise Trame_Cl35_Error; end if; end Reception_Trame; function Chaine_A_Lire return Boolean is B : Boolean; begin Tache_Com_Cl35.Qq_Chose_A_Lire (B); return B; end Chaine_A_Lire; begin null; end Com_Cl35_Bis;
nblk1=7 nid=4 hdr6=8 [0x00] rec0=22 rec1=00 rec2=01 rec3=01c [0x01] rec0=21 rec1=00 rec2=03 rec3=04a [0x02] rec0=1c rec1=00 rec2=02 rec3=088 [0x03] rec0=18 rec1=00 rec2=06 rec3=000 [0x04] rec0=01 rec1=00 rec2=04 rec3=000 [0x05] rec0=01 rec1=00 rec2=04 rec3=000 [0x06] rec0=dd rec1=88 rec2=00 rec3=037 tail 0x2154a8af687782fc69316 0x42a00088462060003 Free Block Chain: 0x4: 0000 00 05 00 12 80 0c 6e 64 20 43 6f 6d 5f 43 6c 33 ┆ nd Com_Cl3┆ 0x5: 0000 00 07 00 0e 80 05 3a 3d 20 30 3b 05 00 03 20 20 ┆ := 0; ┆ 0x7: 0000 00 00 00 44 80 13 65 6e 64 20 54 61 63 68 65 5f ┆ D end Tache_┆