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

⟦bea61ca3f⟧ TextFile

    Length: 7084 (0x1bac)
    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 Ihm, Z80_Defs, Z80, Verif_Input, Mot, Octet,
     Erreur, Registres, Desassembleur, Memoire, Text_Io;
use Z80_Defs, Z80;
package body Z80_Scr is

    type Strptr is access String;
    subtype Regope is Z80_Defs.Operande range A .. Pc;
    Affreg : array (Regope) of Strptr :=
       (A => new String'("R.Form.RA.A"),
        B => new String'("R.Form.RB.B"),
        C => new String'("R.Form.RC.C"),
        D => new String'("R.Form.RD.D"),
        E => new String'("R.Form.RE.E"),
        H => new String'("R.Form.RH.H"),
        L => new String'("R.Form.RL.L"),
        F => new String'("R.Form.RF.F"),
        I => new String'("RS.Form.RI.I"),
        R => new String'("NONE"),
        A_Prime => new String'("RP.Form.RA.A"),
        F_Prime => new String'("RP.Form.RF.F"),
        B_Prime => new String'("RP.Form.RB.B"),
        C_Prime => new String'("RP.Form.RC.C"),
        D_Prime => new String'("RP.Form.RD.D"),
        E_Prime => new String'("RP.Form.RE.E"),
        H_Prime => new String'("RP.Form.RH.H"),
        L_Prime => new String'("RP.Form.RL.L"),
        Af_Prime .. Hl => new String'("NONE"),
        Ix => new String'("RS.Form.RIX.IX"),
        Iy => new String'("RS.Form.RIY.IY"),
        Sp => new String'("RS.Form.RSP.SP"),
        Pc => new String'("RS.Form.RPC.PC"));

    procedure Afficher_Ecran is
    begin
        for I in Z80_Defs.A .. Z80_Defs.I loop
            Afficher_Ecran_Reg (I);
        end loop;
        for I in Z80_Defs.A_Prime .. Z80_Defs.L_Prime loop
            Afficher_Ecran_Reg (I);
        end loop;
        for I in Z80_Defs.Ix .. Z80_Defs.Pc loop
            Afficher_Ecran_Reg (I);
        end loop;
        Afficher_Ecran_Reg (Im);
        Afficher_Ecran_Reg (Iff);
        Afficher_Ecran_Reg (Int);
    end Afficher_Ecran;

    procedure Afficher_Ecran_Reg (Reg : Z80_Defs.Operande) is
        Un_Octet : Octet.T_Octet;
        Un_Mot : Mot.T_Mot;
        Trouvee : Boolean := False;
    begin
        if Etat_Z80 = Endormi then
            if Reg in Registre_Simple then
                Ihm.Window.Put_Field (Main_Win, "MW.BB." & Affreg (Reg).all,
                                      Octet.Convert_Octet_String
                                         (Registres.Lire_Simple (Reg)));
            else
                Un_Mot := Registres.Lire_Double (Reg);
                Ihm.Window.Put_Field (Main_Win, "MW.BB." & Affreg (Reg).all,
                                      Mot.Convert_Mot_String (Un_Mot));
                case Reg is
                    when Ix =>
                        Memoire.Acces_Octet (Memoire.Lire, Un_Mot, Un_Octet);
                        Ihm.Window.Put_Field
                           (Main_Win, "MW.BB.RS.Form.RIIX.IIX",
                            Octet.Convert_Octet_String (Un_Octet));
                    when Iy =>
                        Memoire.Acces_Octet (Memoire.Lire, Un_Mot, Un_Octet);
                        Ihm.Window.Put_Field
                           (Main_Win, "MW.BB.RS.Form.RIIY.IIY",
                            Octet.Convert_Octet_String (Un_Octet));
                    when Sp =>
                        Memoire.Acces_Octet (Memoire.Lire, Un_Mot, Un_Octet);
                        Ihm.Window.Put_Field
                           (Main_Win, "MW.BB.RS.Form.RISP.ISP",
                            Octet.Convert_Octet_String (Un_Octet));
                    when Pc =>
                        while not Trouvee loop
                            Memoire.Acces_Octet
                               (Memoire.Lire, Un_Mot, Un_Octet);
                            Un_Mot := Mot.Add (Un_Mot, 1);
                            Trouvee := Desassembleur.Traiter_Code (Un_Octet);
                        end loop;
                        Ihm.Window.Put_Field
                           (Main_Win, "MW.BB.RS.Form.RINST.INST",
                            Desassembleur.Instruction_En_Texte);
                    when others =>
                        null;
                end case;
            end if;
        end if;
    end Afficher_Ecran_Reg;

    procedure Afficher_Ecran_Reg (Fld : T_Fld) is
    begin
        if Etat_Z80 = Endormi then
            case Fld is
                when Im =>
                    Ihm.Window.Put_Field
                       (Main_Win, "MW.BB.It.F.IM",
                        Integer'Image (Z80.Son_Mode) (2 .. 2));
                when Iff =>
                    if Z80.Iff_1 then
                        Ihm.Window.Put_Field
                           (Main_Win, "MW.BB.It.F.Interrupt", "ENABLE");
                    else
                        Ihm.Window.Put_Field
                           (Main_Win, "MW.BB.It.F.Interrupt", "DISABLE");
                    end if;
                when Int =>
                    if Z80.Interrupt then
                        Ihm.Window.Put_Field (Main_Win,
                                              "MW.BB.It.F.INT", "LOW");
                    else
                        Ihm.Window.Put_Field (Main_Win,
                                              "MW.BB.It.F.INT", "HIGH");
                    end if;
            end case;
        end if;
    end Afficher_Ecran_Reg;

    procedure Lecture_Ecran_Reg (Field : String; Value : String) is
        Reg : Operande;
        Val : Integer;
    begin
        Z80.Stopper;
        if Field = "IM" then
            if Verif_Input.Is_Digit (Value) then
                Val := Integer'Value (Value);
                if Val <= 2 then
                    Z80.Son_Mode := Val;
                else
                    Erreur.Detectee (2);
                end if;
            else
                Erreur.Detectee (2);
            end if;
            Afficher_Ecran_Reg (Im);
        elsif Field = "Interrupt" then
            if Value (1) = 'e' or Value (1) = 'E' then
                Z80.Iff_1 := True;
                Z80.Iff_2 := True;
            elsif Value (1) = 'd' or Value (1) = 'D' then
                Z80.Iff_1 := False;
                Z80.Iff_2 := False;
            else
                Erreur.Detectee (2);
            end if;
            Afficher_Ecran_Reg (Iff);
        else
            Reg := Operande'Value (Field);
            if Reg in Registre_Simple then
                if Verif_Input.Is_Hexadecimal_Byte_Value (Value) then
                    Registres.Ecrire_Simple
                       (Reg, Octet.Convert_String_Octet (Value));
                else
                    Erreur.Detectee (2);
                    Afficher_Ecran_Reg (Reg);
                end if;
            elsif Reg in Registre_Double then
                if Verif_Input.Is_Hexadecimal_Word_Value (Value) then
                    Registres.Ecrire_Double (Reg,
                                             Mot.Convert_String_Mot (Value));
                else
                    Erreur.Detectee (2);
                    Afficher_Ecran_Reg (Reg);
                end if;
            else
                Text_Io.Put_Line
                   ("Lecture_Ecran_Reg ERROR : register id not found");
            end if;
        end if;
    end Lecture_Ecran_Reg;

end Z80_Scr;