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

⟦8a35fe2be⟧ Ada Source

    Length: 14336 (0x3800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, function Instruction_En_Texte, seg_025987, seg_027009, seg_027508, seg_027e6a, separate Desassembleur

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



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"),
        A_Prime            => new String'("A'"),
        B_Prime            => new String'("B'"),
        C_Prime            => new String'("C'"),
        D_Prime            => new String'("D'"),
        E_Prime            => new String'("E'"),
        H_Prime            => new String'("H'"),
        L_Prime            => new String'("L'"),
        F_Prime            => new String'("F'"),
        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 (2 .. 15);

end Instruction_En_Texte;

E3 Meta Data

    nblk1=d
    nid=6
    hdr6=12
        [0x00] rec0=21 rec1=00 rec2=01 rec3=00c
        [0x01] rec0=14 rec1=00 rec2=04 rec3=00c
        [0x02] rec0=14 rec1=00 rec2=0c rec3=016
        [0x03] rec0=14 rec1=00 rec2=08 rec3=00a
        [0x04] rec0=1c rec1=00 rec2=05 rec3=040
        [0x05] rec0=1a rec1=00 rec2=0d rec3=02a
        [0x06] rec0=22 rec1=00 rec2=0b rec3=000
        [0x07] rec0=1f rec1=00 rec2=0a rec3=086
        [0x08] rec0=0a rec1=00 rec2=03 rec3=000
        [0x09] rec0=0a rec1=00 rec2=03 rec3=000
        [0x0a] rec0=1b rec1=00 rec2=0c rec3=000
        [0x0b] rec0=1b rec1=00 rec2=03 rec3=000
        [0x0c] rec0=06 rec1=40 rec2=00 rec3=000
    tail 0x2172079a883a35fc5eb1d 0x42a00088462062803
Free Block Chain:
  0x6: 0000  00 07 03 fc 80 29 20 20 44 20 20 20 20 20 20 20  ┆     )  D       ┆
  0x7: 0000  00 09 00 21 80 1e 61 67 65 20 28 49 6e 73 74 72  ┆   !  age (Instr┆
  0x9: 0000  00 02 00 5a 80 13 65 63 6f 64 65 65 2e 4f 70 5f  ┆   Z  ecodee.Op_┆
  0x2: 0000  00 00 00 c1 80 16 20 20 3d 3e 20 6e 65 77 20 53  ┆        => new S┆