|
|
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: 4350 (0x10fe)
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 Text_Io;
with Mot;
with Alu_16_Bit;
with Desassembleur;
with Registres;
with Octet;
with Binaire;
with Z80_Defs;
package body Test_Alu_16 is
package Mot_Io is new Text_Io.Integer_Io (Num => Mot.T_Mot);
package Bin_8 is new Binaire (Nb_De_Bit => 8);
subtype T_Bit_Octet is Bin_8.Val_Binaire;
use Bin_8;
function Get_Mot return Mot.T_Mot is
Result : Mot.T_Mot;
begin
Mot_Io.Get (Result);
return Result;
end Get_Mot;
procedure Put_Mot (Le_Mot : Mot.T_Mot) is
begin
Mot_Io.Put (Le_Mot);
end Put_Mot;
---------------------------------------------
procedure Read_1_Op (Op : in out Mot.T_Mot) is
begin
Text_Io.Put ("op_1>");
Op := Get_Mot;
Text_Io.Put_Line ("");
Alu_16_Bit.Fournir_Operande_1 (Op);
end Read_1_Op;
procedure Read_2_Op (Op_1, Op_2 : in out Mot.T_Mot) is
begin
Text_Io.Put ("op_1>");
Op_1 := Get_Mot;
Text_Io.Put_Line ("");
Alu_16_Bit.Fournir_Operande_1 (Op_1);
Text_Io.Put ("op_2>");
Op_2 := Get_Mot;
Text_Io.Put_Line ("");
Alu_16_Bit.Fournir_Operande_2 (Op_2);
end Read_2_Op;
procedure Display (Res : Mot.T_Mot) is
Flag : T_Bit_Octet;
begin
Text_Io.Put_Line ("");
Text_Io.Put ("res>");
Put_Mot (Res);
Text_Io.Put_Line ("");
Text_Io.Put ("flag>");
Flag := Convert_Bit (Registres.Lire_Simple (Z80_Defs.F));
for I in reverse Flag'Range loop
if Flag (I) then
Text_Io.Put ("1");
else
Text_Io.Put ("0");
end if;
end loop;
Text_Io.Put_Line ("");
Text_Io.Put_Line ("==================================");
Text_Io.Put_Line ("");
end Display;
procedure Read_Flag is
Flag : Octet.T_Octet := 0;
Flag_Str : String (1 .. 8);
begin
Text_Io.Put ("flag>");
Text_Io.Get (Flag_Str);
for I in reverse 1 .. 8 loop
if Flag_Str (I) = '1' then
Flag := Flag + 2 ** (8 - I);
end if;
end loop;
Registres.Ecrire_Simple (Z80_Defs.F, Flag);
end Read_Flag;
-------------------------------------------------
procedure Exec_Inc is
Op_1 : Mot.T_Mot;
begin
Read_Flag;
Read_1_Op (Op_1);
Display (Alu_16_Bit.Executer (Desassembleur.Inc));
end Exec_Inc;
procedure Exec_Dec is
Op_1 : Mot.T_Mot;
begin
Read_Flag;
Read_1_Op (Op_1);
Display (Alu_16_Bit.Executer (Desassembleur.Dec));
end Exec_Dec;
procedure Exec_Add is
Op_1, Op_2 : Mot.T_Mot;
begin
Read_Flag;
Read_2_Op (Op_1, Op_2);
Display (Alu_16_Bit.Executer (Desassembleur.Add));
end Exec_Add;
procedure Exec_Adc is
Op_1, Op_2 : Mot.T_Mot;
begin
Read_Flag;
Read_2_Op (Op_1, Op_2);
Display (Alu_16_Bit.Executer (Desassembleur.Adc));
end Exec_Adc;
procedure Exec_Sbc is
Op_1, Op_2 : Mot.T_Mot;
begin
Read_Flag;
Read_2_Op (Op_1, Op_2);
Display (Alu_16_Bit.Executer (Desassembleur.Sbc));
end Exec_Sbc;
----------------------------------------------------
function Menu return Character is
Choix : Character;
begin
Text_Io.Put_Line ("1)INC 2)DEC 3)ADD 4)ADC 5)SBC ");
Text_Io.Put ("choix>");
Text_Io.Get (Choix);
Text_Io.Put_Line ("");
return Choix;
end Menu;
----------------------------------------------------
procedure Test is
At_End : Boolean := False;
Choix : Character;
begin
while not At_End loop
Choix := Menu;
case Choix is
when '1' =>
Exec_Inc;
when '2' =>
Exec_Dec;
when '3' =>
Exec_Add;
when '4' =>
Exec_Adc;
when '5' =>
Exec_Sbc;
when others =>
At_End := True;
Text_Io.Put_Line ("FIN");
end case;
end loop;
end Test;
end Test_Alu_16;