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 - downloadIndex: ┃ B T ┃
Length: 5415 (0x1527) 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 Ensemble; package body Memoire_2 is -- CONSTANTES ----------------------------------------------------------- Taille_Bloc_Mem : constant Positive := 2048; -- TYPES ---------------------------------------------------------------- type Mem is array (0 .. Adresse.Val_Max_Adresse) of Octet.T_Octet; type Zone_Memoire is record Ad_Depart : Adresse.T_Adresse := 0; Ad_Fin : Adresse.T_Adresse := 0; Modifiee : Boolean := False; Num_Msg : Message.Num_Message; end record; -- VARIABLES ------------------------------------------------------------ La_Memoire : Mem; Descr_Memoire : array (Num_Bloc) of T_Mem := (others => Rien); Adresse_Courante : Adresse.T_Adresse := 0; -- PROCEDURES ---------------------------------------------------------- function Type_Mem (Ad : Adresse.T_Adresse) return T_Mem is Bloc_Log : Num_Bloc := 0; begin Bloc_Log := Ad / Taille_Bloc_Mem; return Descr_Memoire (Bloc_Log); end Type_Mem; -- GESTION DES ZONES ---------------------------------------------------- procedure Verifier_Zone (Une_Zone : in out Zone_Memoire) is begin if (Adresse_Courante >= Une_Zone.Ad_Depart) and (Adresse_Courante <= Une_Zone.Ad_Fin) then if not Une_Zone.Modifiee then Une_Zone.Modifiee := True; Message.Envoyer (Une_Zone.Num_Msg); end if; end if; end Verifier_Zone; package Gestion_Zones is new Ensemble (Item => Zone_Memoire, Modifier => Verifier_Zone); ------------------------------------------------------------------------- -- INTERFACE ------------------------------------------------------------------------- procedure Lecture (Ad : Adresse.T_Adresse; Donnee : out Octet.T_Octet) is begin case Type_Mem (Ad) is when Ram | Rom => Adresse_Courante := Ad; Donnee := La_Memoire (Ad); when Rien => Donnee := 255; -- Lecture emplacement non declare !!! Message.Envoyer (Message.Lect_Mem_Vide); end case; end Lecture; ------------------------------------------------------------------------ procedure Ecriture (Ad : Adresse.T_Adresse; Donnee : Octet.T_Octet) is begin case Type_Mem (Ad) is when Ram => La_Memoire (Ad) := Donnee; Adresse_Courante := Ad; Gestion_Zones.Verifier; when Rom => -- Ecriture en ROM !!! Message.Envoyer (Message.Ecrit_Rom); when Rien => -- Ecriture a un emplacement vide !!!! Message.Envoyer (Message.Ecrit_Mem_Vide); end case; end Ecriture; -- Entrees pour le DEBUGGER ---------------------------------------- procedure Init is begin La_Memoire := (others => 0); Descr_Memoire := (others => Rien); end Init; ------------------------------------------ procedure Config (Le_Bloc_Memoire : Num_Bloc; Avec_Le_Type : T_Mem) is begin Descr_Memoire (Le_Bloc_Memoire) := Avec_Le_Type; end Config; ------------------------------------------ procedure Lire_Paragraphe (Ad : Adresse.T_Adresse; Parag : out Paragraphe) is begin for I in 0 .. 15 loop Parag (I) := La_Memoire (Ad + I); end loop; end Lire_Paragraphe; ------------------------------------------ procedure Ecrire_Paragraphe (Ad : Adresse.T_Adresse; Parag : Paragraphe) is begin for I in 0 .. 15 loop La_Memoire (Ad + I) := Parag (I); end loop; end Ecrire_Paragraphe; ------------------------------------------ procedure Lire_Octet (Ad : Adresse.T_Adresse; Un_Octet : out Octet.T_Octet) is begin Un_Octet := La_Memoire (Ad); end Lire_Octet; ------------------------------------------ procedure Ecrire_Octet (Ad : Adresse.T_Adresse; Un_Octet : Octet.T_Octet) is begin La_Memoire (Ad) := Un_Octet; Adresse_Courante := Ad; Gestion_Zones.Verifier; end Ecrire_Octet; ------------------------------------------ procedure Marquer_Zone (Ad_Depart : Adresse.T_Adresse; Ad_Fin : Adresse.T_Adresse; Signal : Message.Num_Message; Zone_Id : out Num_Zone) is Une_Zone : Zone_Memoire; begin Une_Zone.Ad_Depart := Ad_Depart; Une_Zone.Ad_Fin := Ad_Fin; Une_Zone.Modifiee := False; Une_Zone.Num_Msg := Signal; Gestion_Zones.Ajouter (Une_Zone, Zone_Id); end Marquer_Zone; ------------------------------------------ procedure Liberer_Zone (Zone_Id : Num_Zone) is begin Gestion_Zones.Retirer (Zone_Id); end Liberer_Zone; ------------------------------------------ procedure Rearmer_Zone (Zone_Id : Num_Zone) is Une_Zone : Zone_Memoire; begin Gestion_Zones.Lire (Zone_Id, Une_Zone); Une_Zone.Modifiee := False; Gestion_Zones.Ecrire (Zone_Id, Une_Zone); end Rearmer_Zone; end Memoire_2;