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

⟦13abdd9b6⟧ Ada Source

    Length: 6144 (0x1800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Machine_Io, seg_041d5a

Derivation

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

E3 Source Code



with Device_Independent_Io;  
with System;
with My_Types;
with Machine_Io;  
with Text_Io;
with Terminal_Specific;


package body Machine_Io is

    package Byte_Io is new Text_Io.Integer_Io (System.Byte); -- trace
    Io_Port : constant String := "!machine.devices.terminal_16";
    F_In_Out : Terminal_Specific.File_Type;
    Col : Natural; -- trace

    procedure Open (With_Mode : Open_Mode) is
        Mode : Device_Independent_Io.File_Mode;
    begin
        Col := 0; -- trace
        case With_Mode is
            when Read_Mode =>
                Mode := Device_Independent_Io.In_File;
            when Write_Mode =>
                Mode := Device_Independent_Io.Out_File;
        end case;
        Device_Independent_Io.Open
           (File => F_In_Out, Mode => Mode, Name => Io_Port, Form => "");

        if With_Mode = Read_Mode then
            Terminal_Specific.Input.Set_Editing
               (File => F_In_Out, Mode => "None");
            Terminal_Specific.Input.Set_Echo (File => F_In_Out, Echo => False);
        end if;
    end Open;

    procedure Close is
    begin
        Text_Io.Put_Line (""); -- trace
        Device_Independent_Io.Close (File => F_In_Out);
    end Close;

    procedure Flush is
    begin
        Open (With_Mode => Read_Mode);
        Terminal_Specific.Input.Flush (F_In_Out);
        Close;
    end Flush;

    procedure Write (S : in My_Types.Byte_String) is
        To_Send : System.Byte_String (1 .. S'Length);
        F_Out : Terminal_Specific.File_Type;
    begin

        Text_Io.Put_Line ("Write : ");
        for K in S'Range loop
            To_Send (K) := System.Byte (S (K));
            Byte_Io.Put (Item => To_Send (K), Width => 7, Base => 16);
            if (K mod 10) = 0 then
                Text_Io.Put_Line (""); -- trace
            end if;
        end loop;



        Device_Independent_Io.Write (File => F_In_Out, Item => To_Send);
    end Write;

    function Read return My_Types.Byte is
        Byte_Read : System.Byte;
    begin
        Device_Independent_Io.Read (File => F_In_Out, Item => Byte_Read);
        if Col = 0 then                -- trace
            Text_Io.Put_Line ("Read :");
        end if;
        Col := Col + 1; -- trace

        Byte_Io.Put (Item => Byte_Read, Width => 7, Base => 16); -- trace
        if (Col mod 10) = 0 then
            Text_Io.Put_Line (""); -- trace
        end if;


        return My_Types.Byte (Byte_Read);
    end Read;
end Machine_Io;





E3 Meta Data

    nblk1=5
    nid=4
    hdr6=6
        [0x00] rec0=21 rec1=00 rec2=01 rec3=00a
        [0x01] rec0=21 rec1=00 rec2=03 rec3=090
        [0x02] rec0=19 rec1=00 rec2=05 rec3=000
        [0x03] rec0=06 rec1=00 rec2=05 rec3=000
        [0x04] rec0=0e rec1=00 rec2=04 rec3=000
    tail 0x2174291e68628568d141d 0x42a00088462060003
Free Block Chain:
  0x4: 0000  00 02 00 40 80 16 69 66 69 63 2e 49 6e 70 75 74  ┆   @  ific.Input┆
  0x2: 0000  00 00 00 17 80 14 70 65 6e 64 65 6e 74 5f 49 6f  ┆      pendent_Io┆