Program Ex3_13 (input,output);

Const
   %include 'ilap:nmos.consts'

Type
   %include 'ilap:nmos.types'

Var
   a, b : Integer;
   pin, pout : Array [1..5] Of Integer;
   is : Array [1..3] Of Integer ;
   os : Array [1..5] Of Integer ;
   null : Array [1..1] Of Integer;

%include 'ilap:nmos.specs'

Begin
   is[1] := bottom; is[2] := top; is[3] := bottom;
   os[1] := bottom; os[2] := top; os[3] := top; os[4] := bottom; os[5] :=bottom;

   Initialise ('X');

   Tpla ('Pla Normal', 'pla', a, b, pin, pout);

   Stpla ('Pla Top In', 'pla', TopInputs, Null, Null, a, b, pin, pout);

   Stpla ('Pla Top Out', 'pla', TopOutputs, Null, Null, a, b, pin, pout);

   { Setup positions for inputs and outputs }

   For a := 1 to 3 do pin[a] := 35 + (a-1)*20;
   For a := 1 to 5 do pout[a] := 150 + (a-1)*20;

   Sepla ('Pla Stretch', 'pla', Stretch, Null, Null, a, b, pin, pout);

   Sepla ('Pla Mixed', 'pla', MixedInputs+MixedOutputs+Stretch, 
          is, os, a, b, pin, pout);

   Finish;
End.
