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

⟦e64529a41⟧ TextFile

    Length: 7429 (0x1d05)
    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

separate (Desassembleur)


function Instruction_En_Texte return String is

    use Z80_Defs;

    -- Types ----------------------------------------------------

    subtype Longueur_Chaine is Positive range 1 .. 20;
    type Chaine_Variable (Taille : Longueur_Chaine := 1) is
        record
            Chaine : String (1 .. Taille);
        end record;

    type T_Pt_String      is access String;
    type T_Table_Operande is array (A .. Aucun) of T_Pt_String;

    -- Variables ------------------------------------------------

    Chaine_Resultat : String (1 .. 20);
    Une_Chaine      : Chaine_Variable;
    Un_Octet        : Octet.T_Octet;
    Un_Mot          : Mot.T_Mot;  
    Chaine_Octet    : String (1 .. 2);
    Chaine_Mot      : String (1 .. 4);

    Table_Operande : T_Table_Operande :=
       (A                  => new String'("A"),
        B                  => new String'("B"),
        C                  => new String'("C"),
        D                  => new String'("D"),
        E                  => new String'("E"),
        H                  => new String'("H"),
        L                  => new String'("L"),
        F                  => new String'("F"),
        I                  => new String'("I"),
        R                  => new String'("R"),
        Af_Prime           => new String'("AF'"),
        Bc_Prime           => new String'("BC'"),
        De_Prime           => new String'("DE'"),
        Hl_Prime           => new String'("HL'"),
        Af                 => new String'("AF"),
        Bc                 => new String'("BC"),
        De                 => new String'("DE"),
        Hl                 => new String'("HL"),
        Ix                 => new String'("IX"),
        Iy                 => new String'("IY"),
        Sp                 => new String'("SP"),
        Pc                 => new String'("PC"),
        Nz                 => new String'("NZ"),
        Z                  => new String'("Z"),
        Nc                 => new String'("NC"),
        Cy                 => new String'("C"),
        Po                 => new String'("PO"),
        Pe                 => new String'("PE"),
        P                  => new String'("P"),
        M                  => new String'("M"),
        N                  => new String'("n"),
        Nn                 => new String'("nn"),
        Offset_E           => new String'("e"),
        Bit_0              => new String'("0"),
        Bit_1              => new String'("1"),
        Bit_2              => new String'("2"),
        Bit_3              => new String'("3"),
        Bit_4              => new String'("4"),
        Bit_5              => new String'("5"),
        Bit_6              => new String'("6"),
        Bit_7              => new String'("7"),
        Z80_0              => new String'("0"),
        Z80_1              => new String'("1"),
        Z80_2              => new String'("2"),
        Z80_00h            => new String'("00H"),
        Z80_08h            => new String'("08H"),
        Z80_10h            => new String'("10H"),
        Z80_18h            => new String'("18H"),
        Z80_20h            => new String'("20H"),
        Z80_28h            => new String'("28H"),
        Z80_30h            => new String'("30H"),
        Z80_38h            => new String'("38H"),
        N_Indirect         => new String'("(n)"),
        C_Indirect         => new String'("(C)"),
        Bc_Indirect        => new String'("(BC)"),
        De_Indirect        => new String'("(DE)"),
        Hl_Indirect        => new String'("(HL)"),
        Ix_Indirect        => new String'("(IX)"),
        Iy_Indirect        => new String'("(IY)"),
        Ix_Plus_D_Indirect => new String'("(IX+d)"),
        Iy_Plus_D_Indirect => new String'("(IY+d)"),
        Nn_Indirect        => new String'("(nn)"),
        Sp_Indirect        => new String'("(SP)"),
        Aucun              => new String'(" "));

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

    function "&" (Chaine_1 : Chaine_Variable; Chaine_2 : String)
                 return Chaine_Variable is
        Resultat : Chaine_Variable;
    begin

        Resultat := Chaine_Variable'(Taille =>
                                        Chaine_1.Taille + Chaine_2'Length,
                                     Chaine => Chaine_1.Chaine & Chaine_2);
        return Resultat;

    end "&";
    ------------------------------


begin

    case Instruction_Decodee.Mnemo is
        when Z80_In =>
            Une_Chaine := Une_Chaine & "IN";
        when Z80_Out =>
            Une_Chaine := Une_Chaine & "OUT";
        when Z80_And =>
            Une_Chaine := Une_Chaine & "AND";
        when Z80_Or =>
            Une_Chaine := Une_Chaine & "OR";
        when Z80_Xor =>
            Une_Chaine := Une_Chaine & "XOR";
        when others =>
            Une_Chaine := Une_Chaine & Mnemonic'Image
                                          (Instruction_Decodee.Mnemo);

    end case;

    Un_Octet := Mot.Poids_Faible (Instruction_Decodee.Donnee);
    Un_Mot   := Mot.Construire (Mot.Poids_Faible (Instruction_Decodee.Donnee),
                                Mot.Poids_Fort (Instruction_Decodee.Donnee));

    Octet.Convert_Octet_Ascii (Un_Octet, Chaine_Octet (1), Chaine_Octet (2));
    Mot.Convert_Mot_Ascii (Un_Mot, Chaine_Mot (1), Chaine_Mot (2),
                           Chaine_Mot (3), Chaine_Mot (4));


    case Instruction_Decodee.Op_Gauche is

        when Offset_E | N =>
            Une_Chaine := (Une_Chaine & "  ") & Chaine_Octet;

        when Nn =>
            Une_Chaine := (Une_Chaine & "  ") & Chaine_Mot;

        when N_Indirect =>
            Une_Chaine := (Une_Chaine & "  (") & Chaine_Octet & ")";


        when Nn_Indirect =>
            Une_Chaine := (Une_Chaine & "  (") & Chaine_Mot & ")";

        when Ix_Plus_D_Indirect =>
            Une_Chaine := ((Une_Chaine & "  (IX+") & Chaine_Octet) & ")";


        when Iy_Plus_D_Indirect =>
            Une_Chaine := ((Une_Chaine & "  (IY+") & Chaine_Octet) & ")";

        when Aucun =>
            null;

        when others =>
            Une_Chaine := (Une_Chaine & " ") &
                             Table_Operande (Instruction_Decodee.Op_Gauche).all;


    end case;


    case Instruction_Decodee.Op_Droit is

        when Offset_E | N =>
            Une_Chaine := (Une_Chaine & ",") & Chaine_Octet;

        when Nn =>
            Une_Chaine := (Une_Chaine & ",") & Chaine_Mot;

        when N_Indirect =>
            Une_Chaine := ((Une_Chaine & ",(") & Chaine_Octet) & ")";

        when Nn_Indirect =>
            Une_Chaine := ((Une_Chaine & ",(") & Chaine_Mot) & ")";

        when Ix_Plus_D_Indirect =>
            Une_Chaine := ((Une_Chaine & ",(IX+") & Chaine_Octet) & ")";

        when Iy_Plus_D_Indirect =>
            Une_Chaine := ((Une_Chaine & ",(IY+") & Chaine_Octet) & ")";

        when Aucun =>
            null;

        when others =>
            Une_Chaine := (Une_Chaine & ",") &
                             Table_Operande (Instruction_Decodee.Op_Droit).all;

    end case;

    if Une_Chaine.Taille > 20 then
        Chaine_Resultat := Une_Chaine.Chaine (1 .. 20);
    else
        Chaine_Resultat (1 .. Une_Chaine.Chaine'Last)      := Une_Chaine.Chaine;
        Chaine_Resultat (Une_Chaine.Chaine'Last + 1 .. 20) := (others => ' ');
    end if;

    Chaine_Resultat (1) := ' ';

    return Chaine_Resultat;

end Instruction_En_Texte;