DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦56bee44ff⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Serial_Port, seg_0417b2

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



with System;
with Terminal_Specific;
with Device_Independent_Io;


package body Serial_Port is


    Out_Channel : Terminal_Specific.File_Type;
    In_Channel : Terminal_Specific.File_Type;


    Specified_Mode : Communication_Mode := Undefined;


    procedure Open (With_Mode : String) is
    begin
        if Specified_Mode /= Undefined then
            Close;
        end if;
        if Communication_Mode'Value (With_Mode) = Read then
            Specified_Mode := Read;
            Device_Independent_Io.Open (File => In_Channel,
                                        Mode => Device_Independent_Io.In_File,
                                        Name => "!machine.devices.terminal_16",
                                        Form => "");
            Terminal_Specific.Input.Set_Editing
               (File => In_Channel, Mode => "None");
            Terminal_Specific.Input.Set_Echo
               (File => In_Channel, Echo => False);
        elsif Communication_Mode'Value (With_Mode) = Write then
            Specified_Mode := Write;
            Device_Independent_Io.Open (File => Out_Channel,
                                        Mode => Device_Independent_Io.Out_File,
                                        Name => "!machine.devices.terminal_16",
                                        Form => "");
        end if;
    end Open;


    procedure Close is
    begin
        if Specified_Mode = Read then
            Device_Independent_Io.Close (File => In_Channel);
            Specified_Mode := Undefined;
        elsif Specified_Mode = Write then
            Device_Independent_Io.Close (File => Out_Channel);
            Specified_Mode := Undefined;
        end if;
    end Close;


    procedure Get (The_Byte : in out System.Byte) is
    begin
        Device_Independent_Io.Read (File => In_Channel, Item => The_Byte);
    end Get;

    procedure Put (The_Byte_String : System.Byte_String) is
    begin
        Device_Independent_Io.Write
           (File => Out_Channel, Item => The_Byte_String);
        delay 0.5;
    end Put;


begin


    Open (With_Mode => "Read");
    Terminal_Specific.Input.Flush (In_Channel);
    Close;


end Serial_Port;

E3 Meta Data

    nblk1=4
    nid=4
    hdr6=6
        [0x00] rec0=20 rec1=00 rec2=01 rec3=010
        [0x01] rec0=1b rec1=00 rec2=02 rec3=076
        [0x02] rec0=11 rec1=00 rec2=03 rec3=000
        [0x03] rec0=03 rec1=ab rec2=b6 rec3=642
    tail 0x2153c5f6286236e2042de 0x42a00088462060003
Free Block Chain:
  0x4: 0000  00 00 00 04 80 01 6f 01 02 4d 04 05 5f 4d 6f 64  ┆      o  M  _Mod┆