{ ********************************************************************** ** Program: S1DEB2.PAS Version: 1.1 - 27 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 developping system monitor5 the A and 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 S1DEB2; {$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 RIS:integer; TASTO:char; procedure INIZIALIZZAZIONE; { Initialization of the control register of the 82C55 } begin port[CNT]:=155; end; function LETTURA (INDIRIZZO:integer):byte; { read the A and C Port status } begin LETTURA:=port[INDIRIZZO]; { write in a variable the value that there is in a particular address } end; begin {program main } clrscr; INIZIALIZZAZIONE; gotoxy(15,3); writeln('VISUALIZATION OF THE A-C PORT IN PROGRESS'); gotoxy(26,4); write('Press any key for exit'); gotoxy(30,10); write('A port status:'); gotoxy(30,12); write('C port status:'); repeat begin RIS:=LETTURA(PDA); gotoxy(36,11); write(RIS:3); RIS:=LETTURA(PDC); gotoxy(36,13); write(RIS:3); delay(50); { Delay of 50 ms } end; until keypressed; { The program is end when you press any kay of the keyboard } read(kbd,TASTO); end.