DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦35e6616c6⟧ TextFile

    Length: 3152 (0xc50)
    Types: TextFile
    Names: »B«

Derivation

└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
    └─ ⟦124ff5788⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Octet, Text_Io, Acia_Pack;
with Xterm;
use Text_Io;
package body Acia_Out is

    task type Acia_Tty is
        pragma Os_Task (0);
        entry Init (Identifier : Natural);
        entry Close;
    end Acia_Tty;
    type T_Tache_Ptr is access Acia_Tty;
    type Tty is
        record
            Tache_Ptr : T_Tache_Ptr;
            Tty_Present : Boolean := False;
        end record;


    Tab_Tache : array (1 .. 10) of Tty;

------------------------------  exports -------------------------------------


    procedure Transmit_Byte (Value : Octet.T_Octet;
                             Identifier : Natural;
                             Seven_Bits : Boolean;
                             Trans_Parity : Parity;
                             Two_Stop : Boolean) is  
        Carac1, Carac2 : Character;
    begin
        -- Octet.Convert_Octet_Ascii (Value, Carac1, Carac2);
        -- Put_Line (" Je transmet le caractere de valeur =>" & Carac1 & Carac2);
        -- Put (" sur ");
        -- if Seven_Bits then
        --     Put (" 7 bits");
        -- else
        --     Put (" 8 bits");
        -- end if;
        -- case Trans_Parity is
        --     when Even =>
        --         Put (" ,parite paire");
        --     when Odd =>
        --         Put (" ,parite impaire");
        --     when None =>
        --         Put (" ,sans parite");
        -- end case;
        -- if Two_Stop then
        --     Put_Line (",2 stop bits.");
        -- else
        --     Put_Line (",1 stop bit.");
        -- end if;
        if Tab_Tache (Identifier).Tty_Present then
            Xterm.Put (Identifier, Value);
        end if;
    end Transmit_Byte;

    procedure Creer (Identifier : Natural) is
    begin
        if Xterm.Open (Identifier) /= 0 then
            Tab_Tache (Identifier).Tty_Present := True;
            Tab_Tache (Identifier).Tache_Ptr := new Acia_Tty;
            Tab_Tache (Identifier).Tache_Ptr.Init (Identifier);
        else
            Tab_Tache (Identifier).Tty_Present := False;
        end if;
    end Creer;

    procedure Detruire (Identifier : Natural) is
    begin
        if Tab_Tache (Identifier).Tty_Present then
            Tab_Tache (Identifier).Tty_Present := False;
            Tab_Tache (Identifier).Tache_Ptr.Close;
        end if;
    end Detruire;

    task body Acia_Tty is
        Id : Natural;
        Val : Integer;
    begin
        select
            accept Init (Identifier : Natural) do
                Id := Identifier;
            end Init;
        end select;
        loop
            select
                accept Close do
                    Xterm.Close (Id);
                end Close;
                exit;
            else
                Val := Xterm.Get (Id);
                case Val is
                    when 1000 =>
                        null;
                    when 2000 =>
                        Text_Io.Put_Line ("error read pipe");
                    when others =>
                        Acia_Pack.Receive (Val, Id);
                end case;
                --delay (Duration'Small);
            end select;
        end loop;
    end Acia_Tty;

end Acia_Out;