program PPI8255;
const
   PPIadres = $0300;
   PPIportA = PPIadres;
   PPIportB = PPIadres+1;
   PPIportC = PPIadres+2;
   PPIcontrol = PPIadres+3;
begin
   {schakel PA7 t/m PA0, PB7 t/m PB0 en PC3 t/m PC0 als inputs en
    schakel PC7 t/m PC4 als outputs}
   port[PPIcontrol]:=$93;
   repeat
      if port[PPIportA]=port[PPIportB] then
         port[PPIportC]:=$F0 {PC7 t/m PC4 = 1111}
      else
         port[PPIportC]:=$00 {PC7 t/m PC4 = 0000}
   until port[PPIportC] and $0F = $00 {totdat PC3 t/m PC0 = 0000}
end.