|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 5382 (0x1506)
Types: TextFile
Names: »B«
└─⟦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⟧
with Octet;
with Registres;
with Text_Io;
with Z80_Defs;
package body Test_Registre is
-- VARIABLES ----------------------------------------------------------
Octet_1, Octet_2, Choix : Octet.T_Octet := 0;
Le_Registre : Z80_Defs.Operande;
Le_Mot : Z80_Defs.Mot;
-- PROCEDURES ---------------------------------------------------------
function Lire_Choix return Octet.T_Octet;
procedure Lire_1_Octet;
procedure Lire_2_Octets;
function Lire_Registre return Z80_Defs.Operande;
-----------------------------------------------------------------------
procedure Je_Teste_Les_Registres is
begin
while True loop
Choix := Lire_Choix;
case Choix is
when 0 =>
Registres.Reset;
when 1 =>
Text_Io.Put ("Numero du registre : ");
Le_Registre := Lire_Registre;
Octet_1 := Registres.Lire_Simple (Le_Registre);
Text_Io.Put ("Valeur du registre simple : ");
Octet.Afficher_Octet_Hexa (Octet_1);
Text_Io.Put_Line ("");
when 2 =>
Text_Io.Put ("Numero du registre : ");
Le_Registre := Lire_Registre;
Le_Mot := Registres.Lire_Double (Le_Registre);
Text_Io.Put ("Valeur du registre double : ");
Octet.Afficher_Octet_Hexa (Octet.T_Octet
(Integer (Le_Mot) / 256));
Octet.Afficher_Octet_Hexa (Octet.T_Octet
(Integer (Le_Mot) mod 256));
Text_Io.Put_Line ("");
when 3 =>
Text_Io.Put ("Numero du registre : ");
Le_Registre := Lire_Registre;
Lire_1_Octet;
Registres.Ecrire_Simple (Le_Registre, Octet_1);
Text_Io.Put_Line ("");
when 4 =>
Text_Io.Put ("Numero du registre : ");
Le_Registre := Lire_Registre;
Lire_2_Octets;
Le_Mot := Z80_Defs.Mot ((Integer (Octet_1) * 256) +
Integer (Octet_2));
Registres.Ecrire_Double (Le_Registre, Le_Mot);
Text_Io.Put_Line ("");
when 5 =>
Registres.Echange_Af_Reg_Prime;
when 6 =>
Registres.Echange_De_Hl;
when 7 =>
Registres.Echange_Bc_De_Hl_Reg_Prime;
when 8 =>
Registres.Afficher;
when others =>
Text_Io.Put_Line ("erreur, mauvais choix");
end case;
end loop;
end Je_Teste_Les_Registres;
----------------------------------------------------------------------
function Lire_Choix return Octet.T_Octet is
begin
Text_Io.Put_Line ("");
Text_Io.Put_Line ("------------------------------------------");
Text_Io.Put_Line ("");
Text_Io.Put ("choix > ");
return Octet.Lire_Octet_Hexa;
end Lire_Choix;
----------------------------------------------------------------------
procedure Lire_1_Octet is
begin
Text_Io.Put ("octet_1> ");
Octet_1 := Octet.Lire_Octet_Hexa;
end Lire_1_Octet;
----------------------------------------------------------------------
procedure Lire_2_Octets is
begin
Text_Io.Put ("octet_1> ");
Octet_1 := Octet.Lire_Octet_Hexa;
Text_Io.Put ("octet_2> ");
Octet_2 := Octet.Lire_Octet_Hexa;
end Lire_2_Octets;
----------------------------------------------------------------------
function Lire_Registre return Z80_Defs.Operande is
Num_Reg : Octet.T_Octet := 0;
use Z80_Defs;
begin
Num_Reg := Octet.Lire_Octet_Hexa;
case Num_Reg is
when 1 =>
return (A);
when 2 =>
return (B);
when 3 =>
return (C);
when 4 =>
return (D);
when 5 =>
return (E);
when 6 =>
return (H);
when 7 =>
return (L);
when 8 =>
return (F);
when 9 =>
return (I);
when 10 =>
return (R);
when 11 =>
return (Af_Prime);
when 12 =>
return (Bc_Prime);
when 13 =>
return (De_Prime);
when 14 =>
return (Hl_Prime);
when 15 =>
return (Af);
when 16 =>
return (Bc);
when 17 =>
return (De);
when 18 =>
return (Hl);
when 19 =>
return (Ix);
when 20 =>
return (Iy);
when 21 =>
return (Sp);
when 22 =>
return (Pc);
when others =>
Text_Io.Put_Line ("Registre inconnu");
end case;
end Lire_Registre;
end Test_Registre;