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

⟦601154b57⟧ TextFile

    Length: 5155 (0x1423)
    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 Registres;
with Sequenceur;
with Point_D_Arret;
with Erreur, Text_Io, Ihm, Z80_Scr, Bus;

package body Z80 is

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

    task type T_Z80 is
        entry Reset;
        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 ------------------------------------------------------------

    procedure Creer (Fid : Ihm.Window_Id) is
    begin
        Main_Win := Fid;
        Tache_Z80 := new T_Z80;
    end Creer;

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

    procedure Reset is
    begin
        Tache_Z80.Reset;
    end Reset;

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

    function Signaler (Le_Signal : Z80_Defs.Signaux_Periph) return Boolean is
        Ok : Boolean := True;
    begin
        select
            Tache_Z80.Signaler (Le_Signal);
        or
            delay 1.0;
            Ok := False;
        end select;  
        return Ok;
    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
        Reg_Pc : Adresse.T_Adresse;
    begin
        delay (Duration'Small);
        Registres.Reset;
        Halt := False;
        Son_Mode := 0;
        Iff_1 := False;
        Iff_2 := False;  
        Z80_Scr.Afficher_Ecran;
        loop
            select
                accept Signaler (Le_Signal : Z80_Defs.Signaux_Periph) do
                    case Le_Signal is
                        when Z80_Defs.Int =>
                            Interrupt := True;
                            Z80_Scr.Afficher_Ecran_Reg (Z80_Scr.Int);
                        when others =>
                            null;
                    end case;
                end Signaler;
            or
                accept Reset do
                    Registres.Reset;
                    Halt := False;
                    Son_Mode := 0;
                    Iff_1 := False;
                    Iff_2 := False;  
                    Interrupt := False;
                    Etat_Z80 := Endormi;
                    Bus.Reset;
                    Ihm.Window.Put_Field
                       (Main_Win, "MW.BB.Message", "Reset CPU OK");
                    Z80_Scr.Afficher_Ecran;
                end Reset;
            or
                accept Lancer do
                    if Etat_Z80 = Endormi then
                        Ihm.Window.Put_Field
                           (Main_Win, "MW.BB.Message", "Running CPU");
                        Etat_Z80 := Actif;
                        Sequenceur.Lancer;
                    end if;
                end Lancer;
            or
                accept Pas_A_Pas do  
                    if Etat_Z80 = Endormi then
                        Ihm.Window.Put_Field
                           (Main_Win, "MW.BB.Message", "Step CPU");
                        Sequenceur.Lancer;
                    end if;
                end Pas_A_Pas;
            or
                accept Stopper do
                    if Etat_Z80 = Actif then
                        Ihm.Window.Put_Field
                           (Main_Win, "MW.BB.Message", "Stop CPU");
                        Etat_Z80 := Endormi;
                        Z80_Scr.Afficher_Ecran;
                    end if;
                end Stopper;
            else  
                delay (Duration'Small);
                if Erreur.Presente then
                    Ihm.Window.Put_Field
                       (Main_Win, "MW.BB.Message", Erreur.Enregistree);
                    Etat_Z80 := Endormi;
                end if;
                if Halt then
                    Ihm.Window.Put_Field
                       (Main_Win, "MW.BB.Message", "CPU is HALTED");
                    Halt := False;
                end if;
                if Etat_Z80 = Actif then  
                    Reg_Pc := Registres.Lire_Double (Z80_Defs.Pc);
                    if Point_D_Arret.Test (Reg_Pc) then
                        Ihm.Window.Put_Field (Main_Win, "MW.BB.Message",
                                              "Breakpoint, Stop CPU");
                        Etat_Z80 := Endormi;
                        Z80_Scr.Afficher_Ecran;
                    else
                        Sequenceur.Lancer;
                    end if;  
                end if;
            end select;
        end loop;
    end T_Z80;

end Z80;