{ ********************************************************************** ** Program: S1DEB3.PAS Version: 1.1 - 28 Jenuary 1999 ** ** Firm: GRIFO(r) Via Dell'Artigiano 8/6 ** ** 40016 San Giorgio di Piano (BO) ** ** Tel. 051-892052 FAX 051-893661 ** ** Developed by: Tassinari Enea ** ********************************************************************** This program allows to display on the A port, the C port status. In order to make an easier visualization of the status lines, it is necessary to get a 20 pins flat cable for connecting GPC(r)15R CN9 connector to TIO 16 CN1 connector, or DEB-01 CN15 connector. } program S1DEB3; {$C-} { Ctrl+C = OFF } const CNT=$17; { control and command register of the PPI 82C55 } PDA=$14; { data register of the A port } PDC=$16; { data register of the C port } var STATO:byte; RIS:integer; TASTO:char; procedure INIZIALIZZAZIONE; { Initialization of the control register of the 82C55 } begin port[CNT]:=139; end; function LETTURA (INDIRIZZO:integer):byte; { read the C Port status } begin LETTURA:=port[INDIRIZZO]; { Put in the variable the contents of the PDC address } end; procedure SCRITTURA (STATO:byte); { write on A port, the C port status } begin port[PDA]:=STATO; end; begin {program main } clrscr; INIZIALIZZAZIONE; gotoxy(10,3); writeln('VISUALIZATION ON A PORT OF THE C PORT STATUS IN PROGRESS'); gotoxy(25,4); write('Press any key for exit'); repeat begin RIS:=LETTURA(PDC); SCRITTURA(RIS); end; until keypressed; SCRITTURA(255); { Led off in the end time } read(kbd,TASTO); end.