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

⟦4ce885d2d⟧ Ada Source

    Length: 4096 (0x1000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Simple_Io, seg_04ba74

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



-- Since the subprograms in simple_io aren't protected via locks, they
-- can be called from an ISR.
with System;
package body Simple_Io is

    pragma Suppress (Range_Check);
    pragma Suppress (Overflow_Check);
    pragma Suppress (Index_Check);
    pragma Suppress (Length_Check);
    pragma Suppress (Discriminant_Check);
    pragma Suppress (Elaboration_Check);


    Column : Count := 1;
    Blanks : String (Count) := (others => ' ');

    procedure Write (Fildes : Integer; Buf : System.Address; Nbytes : Integer);
    pragma Interface (C, Write);

    procedure Basic_Put_Chr (C : Character) is
    begin
        Write (Standard_Output, C'Address, 1);
    end Basic_Put_Chr;
    pragma Inline_Only (Basic_Put_Chr);

    procedure Basic_Put_Str (S : String) is
    begin
        Write (Standard_Output, S'Address, S'Length);
    end Basic_Put_Str;
    pragma Inline_Only (Basic_Put_Str);

    procedure Lock_On is
    begin
        null;
    end Lock_On;
    pragma Inline_Only (Lock_On);

    procedure Lock_Off is
    begin
        null;
    end Lock_Off;
    pragma Inline_Only (Lock_Off);

    procedure Protected_Put_Chr (C : Character) is
    begin
        Lock_On;
        Basic_Put_Chr (C);
        Lock_Off;
    end Protected_Put_Chr;

    procedure Protected_Put_Str (S : String) is
    begin
        Lock_On;
        Basic_Put_Str (S);
        Lock_Off;
    end Protected_Put_Str;

    procedure Put (C : Character) is
    begin
        Protected_Put_Chr (C);
        Column := Column + 1;
    end Put;

    procedure Put (S : String) is
    begin
        Protected_Put_Str (S);
        Column := Column + S'Length;
    end Put;

    procedure Put (I : Integer) is
    begin
        Put (Integer'Image (I));
    end Put;

    procedure New_Line is
    begin
        Protected_Put_Chr (Ascii.Lf);
        Column := 1;
    end New_Line;

    procedure Put_Line (S : String) is
    begin
        Protected_Put_Str (S);
        New_Line;
    end Put_Line;

    procedure Set_Col (Col : Count) is
    begin
        if Col < Column then
            New_Line;
        end if;
        Protected_Put_Str (Blanks (Column + 1 .. Col));
        Column := Col;
    end Set_Col;

    procedure Put (Fd : Integer; C : Character) is
    begin
        Put (C);
    end Put;

    procedure Put (Fd : Integer; S : String) is
    begin
        Put (S);
    end Put;

    procedure Put (Fd : Integer; I : Integer) is
    begin
        Put (I);
    end Put;

    procedure Put_Line (Fd : Integer; S : String) is
    begin
        Put_Line (S);
    end Put_Line;

    procedure New_Line (Fd : Integer) is
    begin
        New_Line;
    end New_Line;

    procedure Set_Col (Fd : Integer; Col : Count) is
    begin
        Set_Col (Col);
    end Set_Col;

end Simple_Io;

E3 Meta Data

    nblk1=3
    nid=0
    hdr6=6
        [0x00] rec0=23 rec1=00 rec2=01 rec3=01a
        [0x01] rec0=2f rec1=00 rec2=02 rec3=020
        [0x02] rec0=2e rec1=00 rec2=03 rec3=000
    tail 0x21750c10e86843ba60a5e 0x42a00088462060003