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

⟦2052d1c19⟧ TextFile

    Length: 7344 (0x1cb0)
    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 Z80, Z80_Scr;
with Text_Io;

package body Registres is

    use Z80_Defs;

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

    Tab_Simple : array (Registre_Simple) of Octet.T_Octet;
    Tab_Double : array (Registre_Double range Ix .. Pc) of Mot.T_Mot;


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

    function Lire_Simple (Le_Registre : Z80_Defs.Registre_Simple)
                         return Octet.T_Octet is
    begin
        return Tab_Simple (Le_Registre);
    end Lire_Simple;


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

    procedure Reset is

    begin
        for I in Registre_Simple loop
            Tab_Simple (I) := 0;
        end loop;
        for I in Tab_Double'First .. Tab_Double'Last loop
            Tab_Double (I) := 0;
        end loop;
    end Reset;

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

    function Lire_Double
                (Le_Registre : Z80_Defs.Registre_Double) return Mot.T_Mot is
        Resultat : Mot.T_Mot := 0;
    begin
        case Le_Registre is
            when Ix .. Pc =>
                Resultat := Tab_Double (Le_Registre);
            when Af_Prime =>
                Resultat := Mot.Construire
                               (Tab_Simple (A_Prime), Tab_Simple (F_Prime));
            when Bc_Prime =>
                Resultat := Mot.Construire
                               (Tab_Simple (B_Prime), Tab_Simple (C_Prime));
            when De_Prime =>
                Resultat := Mot.Construire
                               (Tab_Simple (D_Prime), Tab_Simple (E_Prime));
            when Hl_Prime =>
                Resultat := Mot.Construire
                               (Tab_Simple (H_Prime), Tab_Simple (L_Prime));
            when Af =>  
                Resultat := Mot.Construire (Tab_Simple (A), Tab_Simple (F));
            when Bc =>
                Resultat := Mot.Construire (Tab_Simple (B), Tab_Simple (C));
            when De =>
                Resultat := Mot.Construire (Tab_Simple (D), Tab_Simple (E));
            when Hl =>
                Resultat := Mot.Construire (Tab_Simple (H), Tab_Simple (L));
        end case;
        return Resultat;
    end Lire_Double;

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

    procedure Ecrire_Simple (Le_Registre : Z80_Defs.Registre_Simple;
                             Un_Octet : Octet.T_Octet) is
    begin
        Tab_Simple (Le_Registre) := Un_Octet;
        Z80_Scr.Afficher_Ecran_Reg (Le_Registre);
    end Ecrire_Simple;

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

    procedure Ecrire_Double
                 (Le_Registre : Z80_Defs.Registre_Double; Un_Mot : Mot.T_Mot) is
    begin
        case Le_Registre is
            when Ix .. Pc =>
                Tab_Double (Le_Registre) := Un_Mot;
                Z80_Scr.Afficher_Ecran_Reg (Le_Registre);
            when Af_Prime =>
                Tab_Simple (A_Prime) := Mot.Poids_Fort (Un_Mot);
                Tab_Simple (F_Prime) := Mot.Poids_Faible (Un_Mot);
                Z80_Scr.Afficher_Ecran_Reg (A_Prime);
                Z80_Scr.Afficher_Ecran_Reg (F_Prime);
            when Bc_Prime =>
                Tab_Simple (B_Prime) := Mot.Poids_Fort (Un_Mot);
                Tab_Simple (C_Prime) := Mot.Poids_Faible (Un_Mot);
                Z80_Scr.Afficher_Ecran_Reg (B_Prime);
                Z80_Scr.Afficher_Ecran_Reg (C_Prime);
            when De_Prime =>
                Tab_Simple (D_Prime) := Mot.Poids_Fort (Un_Mot);
                Tab_Simple (E_Prime) := Mot.Poids_Faible (Un_Mot);
                Z80_Scr.Afficher_Ecran_Reg (D_Prime);
                Z80_Scr.Afficher_Ecran_Reg (E_Prime);
            when Hl_Prime =>
                Tab_Simple (H_Prime) := Mot.Poids_Fort (Un_Mot);
                Tab_Simple (L_Prime) := Mot.Poids_Faible (Un_Mot);
                Z80_Scr.Afficher_Ecran_Reg (H_Prime);
                Z80_Scr.Afficher_Ecran_Reg (L_Prime);
            when Af =>
                Tab_Simple (A) := Mot.Poids_Fort (Un_Mot);
                Tab_Simple (F) := Mot.Poids_Faible (Un_Mot);
                Z80_Scr.Afficher_Ecran_Reg (A);
                Z80_Scr.Afficher_Ecran_Reg (F);
            when Bc =>
                Tab_Simple (B) := Mot.Poids_Fort (Un_Mot);
                Tab_Simple (C) := Mot.Poids_Faible (Un_Mot);
                Z80_Scr.Afficher_Ecran_Reg (B);
                Z80_Scr.Afficher_Ecran_Reg (C);
            when De =>
                Tab_Simple (D) := Mot.Poids_Fort (Un_Mot);
                Tab_Simple (E) := Mot.Poids_Faible (Un_Mot);
                Z80_Scr.Afficher_Ecran_Reg (D);
                Z80_Scr.Afficher_Ecran_Reg (E);
            when Hl =>
                Tab_Simple (H) := Mot.Poids_Fort (Un_Mot);
                Tab_Simple (L) := Mot.Poids_Faible (Un_Mot);
                Z80_Scr.Afficher_Ecran_Reg (H);
                Z80_Scr.Afficher_Ecran_Reg (L);
        end case;
    end Ecrire_Double;

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

    procedure Echange_Octet (Octet_1, Octet_2 : in out Octet.T_Octet) is
        Un_Octet : Octet.T_Octet;
    begin
        Un_Octet := Octet_1;
        Octet_1 := Octet_2;
        Octet_2 := Un_Octet;
    end Echange_Octet;

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

    procedure Echange_Af_Reg_Prime is
    begin
        Echange_Octet (Tab_Simple (A_Prime), Tab_Simple (A));
        Echange_Octet (Tab_Simple (F_Prime), Tab_Simple (F));
        Z80_Scr.Afficher_Ecran_Reg (A);
        Z80_Scr.Afficher_Ecran_Reg (F);
        Z80_Scr.Afficher_Ecran_Reg (A_Prime);
        Z80_Scr.Afficher_Ecran_Reg (F_Prime);
    end Echange_Af_Reg_Prime;

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

    procedure Echange_De_Hl is
    begin
        Echange_Octet (Tab_Simple (D), Tab_Simple (H));
        Echange_Octet (Tab_Simple (E), Tab_Simple (L));
        Z80_Scr.Afficher_Ecran_Reg (D);
        Z80_Scr.Afficher_Ecran_Reg (E);
        Z80_Scr.Afficher_Ecran_Reg (H);
        Z80_Scr.Afficher_Ecran_Reg (L);
    end Echange_De_Hl;

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

    procedure Echange_Bc_De_Hl_Reg_Prime is
        Reg_Fort, Reg_Faible : Octet.T_Octet;
    begin
        Echange_Octet (Tab_Simple (B_Prime), Tab_Simple (B));
        Echange_Octet (Tab_Simple (C_Prime), Tab_Simple (C));
        Echange_Octet (Tab_Simple (D_Prime), Tab_Simple (D));
        Echange_Octet (Tab_Simple (E_Prime), Tab_Simple (E));
        Echange_Octet (Tab_Simple (H_Prime), Tab_Simple (H));
        Echange_Octet (Tab_Simple (L_Prime), Tab_Simple (L));
        Z80_Scr.Afficher_Ecran_Reg (B);
        Z80_Scr.Afficher_Ecran_Reg (C);
        Z80_Scr.Afficher_Ecran_Reg (D);
        Z80_Scr.Afficher_Ecran_Reg (E);
        Z80_Scr.Afficher_Ecran_Reg (H);
        Z80_Scr.Afficher_Ecran_Reg (L);
        Z80_Scr.Afficher_Ecran_Reg (B_Prime);
        Z80_Scr.Afficher_Ecran_Reg (C_Prime);
        Z80_Scr.Afficher_Ecran_Reg (D_Prime);
        Z80_Scr.Afficher_Ecran_Reg (E_Prime);
        Z80_Scr.Afficher_Ecran_Reg (H_Prime);
        Z80_Scr.Afficher_Ecran_Reg (L_Prime);
    end Echange_Bc_De_Hl_Reg_Prime;

end Registres;