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

⟦17c953407⟧ Ada Source

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

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



-- UNIT: package body TERMINAL
-- FILES: termbody.a termspec.a hanoi.a
-- PURPOSE: support terminal interface to procedure HANOI
-- DESCRIPTION: draws picture of solution to "Towers of Hanoi" problem
-- .......................................................................... --

with Text_Io;
use Text_Io;
package body Terminal is
    use Ascii;
----------------------------------------------------------
-- Procedures for drawing pictures of the solution on VDU.
-- CLEAR_SCREEN and FIX_CURSOR are specific to VT100, HP26xx
----------------------------------------------------------

    procedure Clear_Screen is
    begin
        case Term is
            when Hp =>
                Fix_Cursor (1, 1);
                Put (Esc & "J");
            when Vt100 =>
                Put (Esc & "[2J");
            when Freedom100 =>
                Put (Esc & "*");
        end case;
    end Clear_Screen;

    procedure Fix_Cursor (D : Depth; A : Width) is

    begin
        case Term is
            when Hp =>
                Put (Esc & "&a");
                Integer_Io.Put (D - 1, 1);
                Put ('y');
                Integer_Io.Put (A - 1, 1);
                Put ('C');
            when Vt100 =>
                Put (Esc & "[");
                Integer_Io.Put (D, 1);
                Put (';');
                Integer_Io.Put (A, 1);
                Put ('f');
            when Freedom100 =>
                Put (Ascii.Esc & "=" & Character'Val (31 + D) &
                     Character'Val (31 + A));
        end case;
    end Fix_Cursor;

end Terminal;

-- .......................................................................... --
--
-- DISTRIBUTION AND COPYRIGHT:
--
-- This software is released to the Public Domain (note:
--   software released to the Public Domain is not subject
--   to copyright protection).
-- Restrictions on use or distribution:  NONE
--
-- DISCLAIMER:
--
-- This software and its documentation are provided "AS IS" and
-- without any expressed or implied warranties whatsoever.
-- No warranties as to performance, merchantability, or fitness
-- for a particular purpose exist.
--
-- Because of the diversity of conditions and hardware under
-- which this software may be used, no warranty of fitness for
-- a particular purpose is offered.  The user is advised to
-- test the software thoroughly before relying on it.  The user
-- must assume the entire risk and liability of using this
-- software.
--
-- In no event shall any person or organization of people be
-- held responsible for any direct, indirect, consequential
-- or inconsequential damages or lost profits.

E3 Meta Data

    nblk1=3
    nid=0
    hdr6=6
        [0x00] rec0=1e rec1=00 rec2=01 rec3=064
        [0x01] rec0=23 rec1=00 rec2=03 rec3=004
        [0x02] rec0=10 rec1=00 rec2=02 rec3=000
    tail 0x2176578ec87e16431b8c5 0x42a00088462060003