DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦b5f3eb9bd⟧ Ada Source

    Length: 12288 (0x3000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Z80_Scr, seg_026240, seg_026a30, seg_027522, seg_027e84

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



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;

E3 Meta Data

    nblk1=b
    nid=a
    hdr6=14
        [0x00] rec0=19 rec1=00 rec2=01 rec3=056
        [0x01] rec0=1c rec1=00 rec2=09 rec3=02c
        [0x02] rec0=04 rec1=00 rec2=05 rec3=032
        [0x03] rec0=11 rec1=00 rec2=0b rec3=050
        [0x04] rec0=14 rec1=00 rec2=08 rec3=01c
        [0x05] rec0=18 rec1=00 rec2=04 rec3=06e
        [0x06] rec0=1d rec1=00 rec2=06 rec3=03c
        [0x07] rec0=01 rec1=00 rec2=07 rec3=00e
        [0x08] rec0=18 rec1=00 rec2=03 rec3=030
        [0x09] rec0=07 rec1=00 rec2=02 rec3=001
        [0x0a] rec0=f2 rec1=7f rec2=00 rec3=000
    tail 0x21720df0683a574d501a7 0x42a00088462060003
Free Block Chain:
  0xa: 0000  00 00 03 fc 80 32 64 6f 77 2e 50 75 74 5f 46 69  ┆     2dow.Put_Fi┆