|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 6144 (0x1800) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Potentiometre, seg_05acb7
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Ds1267; with Utils; with X9312; package body Potentiometre is function Creer (E1 : in Carte_Es.Numero_Sortie; E2 : in Carte_Es.Numero_Sortie; E3 : in Carte_Es.Numero_Sortie; Avec : in Composant) return Objet is L_Objet : Objet (Base => Avec); begin L_Objet.Valeur := 0; case Avec is when Chip_X9312 => L_Objet.Chip_X9312 := X9312.Creer (Front => E1, Variation => E2, Selection => E3); when Chip_Ds1267 => L_Objet.Chip_Ds1267 := Ds1267.Creer (Horloge => E1, Donnee => E2, Reset => E3); end case; return L_Objet; end Creer; procedure Fixer (Un_Objet : in out Objet; A_La_Valeur : Utils.Pourcent) is O : Objet renames Un_Objet; begin case O.Base is when Chip_X9312 => X9312.Fixer (Un_Objet => O.Chip_X9312, Depuis => O.Valeur, Vers => A_La_Valeur); when Chip_Ds1267 => Ds1267.Fixer (Un_Objet => O.Chip_Ds1267, Depuis => O.Valeur, Vers => A_La_Valeur); end case; end Fixer; procedure Augmenter (Un_Objet : in out Objet; De : Utils.Pourcent := 1) is O : Objet renames Un_Objet; A_La_Valeur : Utils.Pourcent; use Utils; begin begin A_La_Valeur := O.Valeur + De; exception when others => A_La_Valeur := Utils.Pourcent'Last; end; case O.Base is when Chip_X9312 => X9312.Fixer (Un_Objet => O.Chip_X9312, Depuis => O.Valeur, Vers => A_La_Valeur); when Chip_Ds1267 => Ds1267.Fixer (Un_Objet => O.Chip_Ds1267, Depuis => O.Valeur, Vers => A_La_Valeur); end case; end Augmenter; procedure Diminuer (Un_Objet : in out Objet; De : Utils.Pourcent := 1) is O : Objet renames Un_Objet; A_La_Valeur : Utils.Pourcent; use Utils; begin begin A_La_Valeur := O.Valeur - De; exception when others => A_La_Valeur := Utils.Pourcent'First; end; case O.Base is when Chip_X9312 => X9312.Fixer (Un_Objet => O.Chip_X9312, Depuis => O.Valeur, Vers => A_La_Valeur); when Chip_Ds1267 => Ds1267.Fixer (Un_Objet => O.Chip_Ds1267, Depuis => O.Valeur, Vers => A_La_Valeur); end case; end Diminuer; function Lire (Un_Objet : in Objet) return Utils.Pourcent is begin return Un_Objet.Valeur; end Lire; end Potentiometre;
nblk1=5 nid=3 hdr6=8 [0x00] rec0=1f rec1=00 rec2=01 rec3=046 [0x01] rec0=1a rec1=00 rec2=04 rec3=010 [0x02] rec0=1b rec1=00 rec2=02 rec3=056 [0x03] rec0=0b rec1=00 rec2=05 rec3=000 [0x04] rec0=0b rec1=00 rec2=05 rec3=000 tail 0x2176a4a30893a4c3e4943 0x42a00088462060003 Free Block Chain: 0x3: 0000 00 00 00 04 80 01 20 01 02 03 04 05 06 07 08 09 ┆ ┆