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

⟦0aff6f485⟧ TextFile

    Length: 12935 (0x3287)
    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 Bus;
with D_Gui_Driver;
with Desassembleur;
with Gui_Interface;
with Memoire;
with Mot;
with Octet;
with Registres;
with Xt_Interface;
with Z80_Defs;
with Point_D_Arret;
with Z80;
with Z_Debug_Tache;

package body Z_Debug is
    --------------------------------------------------------------------------

    procedure Je_Teste is

    begin

        Gui_Interface.Init;

        Memoire.Creer;
        Bus.Creer;
        Z80.Creer;

        -- prologue
        Registres.Reset;

        Gui_Interface.Set_Message (Message => "Reset");

        Rafraichir_Ecran;

        loop
            D_Gui_Driver.Process_Event;

            if Xt_Interface.Pending then
                Xt_Interface.Next_Event;
                Xt_Interface.Dispatch_Event;
            end if;


        end loop;

    exception

        when D_Gui_Driver.Kill =>
            null;
    end Je_Teste;


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

    procedure Valider_Memoire is

        I, J : Positive := 1;
        Ligne : Natural := 0;

        Reception_Pointeur : String (1 .. 80) := (others => '#');
        Reception_Dump : String (1 .. 16 * 50) := (others => '0');
        Adresse : Mot.T_Mot;
        Donnee : Octet.T_Octet;

    begin

        Gui_Interface.Iterator_Memory_List;
        Gui_Interface.Iterator.Init;
        I := 1;

        while not Gui_Interface.Iterator.Done loop
            Reception_Pointeur (I) := Gui_Interface.Iterator.Value;
            I := I + 1;
            Gui_Interface.Iterator.Next;
        end loop;


        Gui_Interface.Iterator_Memory_Dump;
        Gui_Interface.Iterator.Init;
        J := 1;

        while not Gui_Interface.Iterator.Done loop
            Reception_Dump (J) := Gui_Interface.Iterator.Value;
            J := J + 1;
            Gui_Interface.Iterator.Next;
        end loop;



        I := 1;
        Ligne := 0;
        while Reception_Pointeur (I) /= '#' loop

            Adresse := Mot.Convert_Ascii_Mot
                          (Reception_Pointeur (I), Reception_Pointeur (I + 1),
                           Reception_Pointeur (I + 2),
                           Reception_Pointeur (I + 3));  
            I := I + 4;


            J := (Ligne * 48) + 1;
            for Compteur_Octet in 1 .. 16 loop

                Donnee := Octet.Convert_Ascii_Octet
                             (Reception_Dump (J), Reception_Dump (J + 1));
                Memoire.Acces_Octet (Memoire.Ecrire, Adresse, Donnee);

                Adresse := Mot.Add (Adresse, Mot.Construire (0, 1));
                J := J + 3;

            end loop;

            Ligne := Ligne + 1;

        end loop;



    end Valider_Memoire;


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

    procedure Valider_Ecran is

        use Z80_Defs;
        Reception : String (1 .. 80);
        J : Positive := 1;
        Un_Octet : Octet.T_Octet;
        Un_Mot : Mot.T_Mot;
    begin

        -- recuperation de la chaine

        Gui_Interface.Iterator_Z80_Status;

        Gui_Interface.Iterator.Init;

        while not Gui_Interface.Iterator.Done loop
            Reception (J) := Gui_Interface.Iterator.Value;

            J := J + 1;
            Gui_Interface.Iterator.Next;
        end loop;

        --Gui_Interface.Set_Instruction ("ecran lu");


        -- affectation des registres
        Un_Octet := Octet.Convert_Ascii_Octet (Reception (1), Reception (2));
        Registres.Ecrire_Simple (A, Un_Octet);

        Un_Octet := Octet.Convert_Ascii_Octet (Reception (3), Reception (4));
        Registres.Ecrire_Simple (F, Un_Octet);

        Un_Octet := Octet.Convert_Ascii_Octet (Reception (5), Reception (6));
        Registres.Ecrire_Simple (B, Un_Octet);

        Un_Octet := Octet.Convert_Ascii_Octet (Reception (7), Reception (8));
        Registres.Ecrire_Simple (C, Un_Octet);

        Un_Octet := Octet.Convert_Ascii_Octet (Reception (9), Reception (10));
        Registres.Ecrire_Simple (D, Un_Octet);

        Un_Octet := Octet.Convert_Ascii_Octet (Reception (11), Reception (12));
        Registres.Ecrire_Simple (E, Un_Octet);

        Un_Octet := Octet.Convert_Ascii_Octet (Reception (13), Reception (14));
        Registres.Ecrire_Simple (H, Un_Octet);

        Un_Octet := Octet.Convert_Ascii_Octet (Reception (15), Reception (16));
        Registres.Ecrire_Simple (L, Un_Octet);

        Un_Octet := Octet.Convert_Ascii_Octet (Reception (17), Reception (18));
        Registres.Ecrire_Simple (I, Un_Octet);

        ---------------------
        Un_Mot := Mot.Convert_Ascii_Mot (Reception (19), Reception (20),
                                         Reception (21), Reception (22));
        Registres.Ecrire_Double (Af_Prime, Un_Mot);

        Un_Mot := Mot.Convert_Ascii_Mot (Reception (23), Reception (24),
                                         Reception (25), Reception (26));
        Registres.Ecrire_Double (Bc_Prime, Un_Mot);

        Un_Mot := Mot.Convert_Ascii_Mot (Reception (27), Reception (28),
                                         Reception (29), Reception (30));
        Registres.Ecrire_Double (De_Prime, Un_Mot);

        Un_Mot := Mot.Convert_Ascii_Mot (Reception (31), Reception (32),
                                         Reception (33), Reception (34));
        Registres.Ecrire_Double (Hl_Prime, Un_Mot);

        ---------------------
        Un_Mot := Mot.Convert_Ascii_Mot (Reception (35), Reception (36),
                                         Reception (37), Reception (38));
        Registres.Ecrire_Double (Ix, Un_Mot);

        Un_Mot := Mot.Convert_Ascii_Mot (Reception (39), Reception (40),
                                         Reception (41), Reception (42));
        Registres.Ecrire_Double (Iy, Un_Mot);

        Un_Mot := Mot.Convert_Ascii_Mot (Reception (43), Reception (44),
                                         Reception (45), Reception (46));
        Registres.Ecrire_Double (Sp, Un_Mot);

        Un_Mot := Mot.Convert_Ascii_Mot (Reception (47), Reception (48),
                                         Reception (49), Reception (50));
        Registres.Ecrire_Double (Pc, Un_Mot);


        -- recuperation de la chaine des points d arret

        Gui_Interface.Iterator_Break_List;
        J := 1;

        Gui_Interface.Iterator.Init;

        while not Gui_Interface.Iterator.Done loop
            Reception (J) := Gui_Interface.Iterator.Value;
            J := J + 1;
            Gui_Interface.Iterator.Next;
        end loop;


        Point_D_Arret.Creer;
        J := 1;

        for Numero in Point_D_Arret.T_Taille_Liste loop

            if Reception (J) /= '#' then  
                Un_Mot := Mot.Convert_Ascii_Mot
                             (Reception (J), Reception (J + 1),
                              Reception (J + 2), Reception (J + 3));
                Point_D_Arret.Mise_A_Jour_Liste (Un_Mot, Numero);
            end if;  
            J := J + 4;

        end loop;


        -- Lecture du Dump Memoire ------------------------

        Valider_Memoire;


    end Valider_Ecran;
    -------------------------------------------------------------------------

    procedure Rafraichir_Memoire is

        I, J : Positive := 1;

        Reception : String (1 .. 80) := (others => '#');
        Emission : String (1 .. 36) := (others => '0');
        Adresse : Mot.T_Mot;
        Donnee : Octet.T_Octet;

    begin

        Gui_Interface.Iterator_Memory_List;
        Gui_Interface.Iterator.Init;
        I := 1;

        while not Gui_Interface.Iterator.Done loop
            Reception (I) := Gui_Interface.Iterator.Value;
            I := I + 1;
            Gui_Interface.Iterator.Next;
        end loop;


        Gui_Interface.Delete_Memory_Dump;

        I := 1;
        while Reception (I) /= '#' loop

            Adresse := Mot.Convert_Ascii_Mot
                          (Reception (I), Reception (I + 1),
                           Reception (I + 2), Reception (I + 3));  
            I := I + 4;

            for J in 1 .. 4 loop  
                Emission (J) := Reception ((I + J) - 1);
            end loop;

            J := 5;
            for Compteur_Octet in 1 .. 16 loop

                Memoire.Acces_Octet (Memoire.Lire, Adresse, Donnee);
                Octet.Convert_Octet_Ascii
                   (Donnee, Emission (J), Emission (J + 1));
                J := J + 2;  
                Adresse := Mot.Add (Adresse, Mot.Construire (0, 1));

            end loop;

            Gui_Interface.Set_Memory_Line (Emission);

        end loop;

        Gui_Interface.Display_Memory_Dump;

    end Rafraichir_Memoire;
    --------------------------------------------------------------------------

    procedure Rafraichir_Ecran is

        use Z80_Defs;
        Emission : String (1 .. 56) := (others => ' ');
        J : Positive := 1;
        Un_Octet : Octet.T_Octet;
        Un_Mot : Mot.T_Mot;
        Reg_Ix, Reg_Iy, Reg_Sp, Reg_Pc : Mot.T_Mot;
        Trouvee : Boolean := False;

    begin

        Un_Octet := Registres.Lire_Simple (A);
        Octet.Convert_Octet_Ascii (Un_Octet, Emission (J), Emission (J + 1));
        J := J + 2;

        Un_Octet := Registres.Lire_Simple (F);
        Octet.Convert_Octet_Ascii (Un_Octet, Emission (J), Emission (J + 1));
        J := J + 2;

        Un_Octet := Registres.Lire_Simple (B);
        Octet.Convert_Octet_Ascii (Un_Octet, Emission (J), Emission (J + 1));
        J := J + 2;

        Un_Octet := Registres.Lire_Simple (C);
        Octet.Convert_Octet_Ascii (Un_Octet, Emission (J), Emission (J + 1));
        J := J + 2;

        Un_Octet := Registres.Lire_Simple (D);
        Octet.Convert_Octet_Ascii (Un_Octet, Emission (J), Emission (J + 1));
        J := J + 2;

        Un_Octet := Registres.Lire_Simple (E);
        Octet.Convert_Octet_Ascii (Un_Octet, Emission (J), Emission (J + 1));
        J := J + 2;

        Un_Octet := Registres.Lire_Simple (H);
        Octet.Convert_Octet_Ascii (Un_Octet, Emission (J), Emission (J + 1));
        J := J + 2;

        Un_Octet := Registres.Lire_Simple (L);
        Octet.Convert_Octet_Ascii (Un_Octet, Emission (J), Emission (J + 1));
        J := J + 2;

        Un_Octet := Registres.Lire_Simple (I);
        Octet.Convert_Octet_Ascii (Un_Octet, Emission (J), Emission (J + 1));
        J := J + 2;

        Un_Mot := Registres.Lire_Double (Af_Prime);
        Mot.Convert_Mot_Ascii (Un_Mot, Emission (J), Emission (J + 1),
                               Emission (J + 2), Emission (J + 3));
        J := J + 4;

        Un_Mot := Registres.Lire_Double (Bc_Prime);
        Mot.Convert_Mot_Ascii (Un_Mot, Emission (J), Emission (J + 1),
                               Emission (J + 2), Emission (J + 3));
        J := J + 4;

        Un_Mot := Registres.Lire_Double (De_Prime);
        Mot.Convert_Mot_Ascii (Un_Mot, Emission (J), Emission (J + 1),
                               Emission (J + 2), Emission (J + 3));
        J := J + 4;

        Un_Mot := Registres.Lire_Double (Hl_Prime);
        Mot.Convert_Mot_Ascii (Un_Mot, Emission (J), Emission (J + 1),
                               Emission (J + 2), Emission (J + 3));
        J := J + 4;

        Reg_Ix := Registres.Lire_Double (Ix);
        Mot.Convert_Mot_Ascii (Reg_Ix, Emission (J), Emission (J + 1),
                               Emission (J + 2), Emission (J + 3));
        J := J + 4;

        Reg_Iy := Registres.Lire_Double (Iy);
        Mot.Convert_Mot_Ascii (Reg_Iy, Emission (J), Emission (J + 1),
                               Emission (J + 2), Emission (J + 3));
        J := J + 4;

        Reg_Sp := Registres.Lire_Double (Sp);
        Mot.Convert_Mot_Ascii (Reg_Sp, Emission (J), Emission (J + 1),
                               Emission (J + 2), Emission (J + 3));
        J := J + 4;

        Reg_Pc := Registres.Lire_Double (Pc);
        Mot.Convert_Mot_Ascii (Reg_Pc, Emission (J), Emission (J + 1),
                               Emission (J + 2), Emission (J + 3));
        J := J + 4;

        Memoire.Acces_Octet (Memoire.Lire, Reg_Ix, Un_Octet);
        Octet.Convert_Octet_Ascii (Un_Octet, Emission (J), Emission (J + 1));
        J := J + 2;

        Memoire.Acces_Octet (Memoire.Lire, Reg_Iy, Un_Octet);
        Octet.Convert_Octet_Ascii (Un_Octet, Emission (J), Emission (J + 1));
        J := J + 2;

        Memoire.Acces_Octet (Memoire.Lire, Reg_Sp, Un_Octet);
        Octet.Convert_Octet_Ascii (Un_Octet, Emission (J), Emission (J + 1));
        J := J + 2;

        -- Recherche de l'instruction_suivante

        while not Trouvee loop
            Memoire.Acces_Octet (Memoire.Lire, Reg_Pc, Un_Octet);
            Reg_Pc := Mot.Add (Reg_Pc, 1);
            Trouvee := Desassembleur.Traiter_Code (Un_Octet);
        end loop;

        Gui_Interface.Set_Instruction (Desassembleur.Instruction_En_Texte);

        Gui_Interface.Update (Emission);

        Rafraichir_Memoire;


    end Rafraichir_Ecran;





end Z_Debug;