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

⟦147cf9cb6⟧ TextFile

    Length: 4465 (0x1171)
    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 Adresse;
with Gui_Interface;
with Registres;
with Sequenceur;
with Point_D_Arret;
with Erreur;
with Z_Debug;

package body Z80 is

    -- TYPES -----------------------------------------------------------------

    task type T_Z80 is
        pragma Os_Task (0);  
        entry Etat (Son_Etat : out T_Etat);
        entry Reset;
        entry Afficher;  
        entry Signaler (Le_Signal : Z80_Defs.Signaux_Periph);
        entry Lancer;  
        entry Pas_A_Pas;
        entry Stopper;
    end T_Z80;


    type Pt_Tache_Z80 is access T_Z80;


    -- VARIABLES -------------------------------------------------------------


    Tache_Z80 : Pt_Tache_Z80;


    -- PROCEDURES ------------------------------------------------------------

    function Etat return T_Etat is
        Son_Etat : T_Etat;
    begin  
        Tache_Z80.Etat (Son_Etat);
        return Son_Etat;
    end Etat;

    ----------------------------------------------

    procedure Creer is
    begin
        Tache_Z80 := new T_Z80;
    end Creer;

    ----------------------------------------------
    procedure Reset is
    begin
        Tache_Z80.Reset;
    end Reset;

    ----------------------------------------------

    procedure Afficher is
    begin
        Tache_Z80.Afficher;
    end Afficher;

    ----------------------------------------------

    procedure Signaler (Le_Signal : Z80_Defs.Signaux_Periph) is
    begin
        Tache_Z80.Signaler (Le_Signal);
    end Signaler;

    ----------------------------------------------

    procedure Lancer is
    begin
        Tache_Z80.Lancer;
    end Lancer;

    ----------------------------------------------

    procedure Pas_A_Pas is
    begin
        Tache_Z80.Pas_A_Pas;
    end Pas_A_Pas;

    ----------------------------------------------

    procedure Stopper is
    begin
        Tache_Z80.Stopper;
    end Stopper;

    ----------------------------------------------

    procedure Detruire is
    begin
        abort Tache_Z80.all;
    end Detruire;


    -- TACHES ----------------------------------------------------------------

    task body T_Z80 is

        Etat_Z80 : T_Etat := Endormi;
        Reg_Pc : Adresse.T_Adresse;

    begin
        loop
            select

                ---------------------------------

                accept Etat (Son_Etat : out T_Etat) do
                    Son_Etat := Etat_Z80;
                end Etat;

            or
                ---------------------------------

                accept Reset do
                    Registres.Reset;
                    Halt := False;
                    Son_Mode := 0;
                    Iff_1 := False;
                    Iff_2 := False;  
                    Etat_Z80 := Actif;
                end Reset;

                ---------------------------------
            or
                accept Afficher do
                    if Etat_Z80 = Actif then
                        null;
                        --Gui_Interface.Set_Message (Message => "Actif");
                    else
                        null;
                        --Gui_Interface.Set_Message (Message => "Endormi");
                    end if;
                end Afficher;

                ---------------------------------
            or

                accept Signaler (Le_Signal : Z80_Defs.Signaux_Periph) do
                    null;
                end Signaler;

                ---------------------------------

            or
                accept Lancer do
                    Sequenceur.Lancer;
                    Etat_Z80 := Actif;
                end Lancer;

                ---------------------------------

            or
                accept Pas_A_Pas do  
                    Sequenceur.Lancer;
                end Pas_A_Pas;

                ---------------------------------
            or  
                accept Stopper do
                    Etat_Z80 := Endormi;
                end Stopper;


                ---------------------------------

            else
                if Etat_Z80 = Actif then  
                    Reg_Pc := Registres.Lire_Double (Z80_Defs.Pc);
                    if (Erreur.Presente or else
                        Point_D_Arret.Present (Reg_Pc)) then

                        Etat_Z80 := Endormi;

                    else
                        Sequenceur.Lancer;
                    end if;  
                end if;

            end select;

        end loop;

    end T_Z80;

end Z80;