LAPPEN Andreas Setiawan Saluran paralel LPT Daftar pustaka

DATAR PU)TAKA

I. IDM PXT Hdware Reference Liby

2. Rizal iawa, Tutorial Perancangan Hardware. Elex Media, Jakaa, 1997
3. rtsap Santosa, MenyaKUnuan an� Kumpuler, Andi Oet, Yogykr, 1995
4. Jogiynto H.M, Turho Pas:uf, ndi Ofet, Yoyka, 195
5. Aianto E.P. Tenik Anturmuka Komputer, Ghn llm, Yoyka, 202

13

Lampiran

:

Program Pcngatur Kooiguru i Lampu

{=
-�
===



=-

'

=�
==

=
=�

�=
==�
-

'Judul : Pengendali Miniatur Lampulalulinta� denan kontrol LPT' 'Lang. :

TUBO PASCAL 7.0' 'Date: 204'




= } Uses Ct:

Vr
a.b,c:intcgcr;
Const
Konfigl•33;
Konfig2•34;
Konfig3- 36;
Konfig4= 12;
Konfig5=20;
Konfig6=36;

Procdure LPT(kode:integer);
egin
port[S378):=kode;
end;

14


Procdure Layar_utamo;
begin
goloxy(25,5) ;

wit(' Simulsi Koutrol Tric Light');
=
"=
= ');
�=
:
=�

=
goloxy(25.6) ;\nitc(' =
=

gotoxy(25,7) ;write(' (Turo Pal 7.0) );
gotoxy(25,20);write(' II'):
gotoxy(25,21 );wite(' I (B) I ');
gotoxy(25,22);write(' I I ');

gotoxy(25,23);writc('

! uo.__ ');

__

gotoxy{25,24);write(' ... ');
gmoxy(25,25);write(' ');
gotoxy(25,26);write(' (A) (C)');
gotoxy(25,27);write(' ');
gotoxy(25,28);write'

__ ..

.__ ');

gotoxy(25,29);writc(' 1. .• I ');
gotoxy(25,30);writc' ll ');
gotoxy(25,31 );\\Titc(' l (0) I );
gotoxy(25,32);writc(' I I ');


15

Prcde konrol(vr langkah:integer);

var a l.a2.aJ.bI,b 2,b3,cl,c2,c 3,d I,d2,d3:integer;
begin
e

lngkah of

I : egin
al :d; a2:�"hitc; a3:,vhite:
LPT(konfigI);
bl:\vhite; b2:�whitc; b3:=green;
cud;
2: begin
a! :d; a2:=white; a3:=whiie;
LPT(konfig2);
b1 :\vhite; b2:=yellow; b3:=white;

end;
3: begin
a! :=ed ; a2:-white : a3:ite;
LPT(koufig3);
b I:�d; b2:=white; b3:\'hite;
end:
4: begin
a!:"\vhitc; a2:"\vhitc; a3:=grcen;
LPT(konig4);
bl:=red; b2:\Vhite: b3:=v•hite;

16

end;
5: begin

nI:=white; n 2:rycllow; n3:·=white:
LPT(konig5);
bl:d; b 2:=white : b 3:"\\hite;
end;

6: egin
al :�cd: 2:'white; 3:=white;

LPT(konfig6);
bl:-d; h2:"\vhite; b3:=white;
end;
end;

gotoxy(26+ 15,23);
textcolorb I);writc(•
' ');textcolor(b2);write(•
' ');textcolor(b3 );write('*');
gotoxy(l8+ 15,24);
' ') ;textolor(3) ;wite('•);
textcolor(nI );writ:('•');textcolor(i);wri te(•
gotoxy(30+ 15.28);
tcxtcolor(n I);write'•');textcolor(2 );wri t('•');tcxtcolor(n3) ;write('•);
gotoxy(22+15,29);
tc.xtcolor(bI);write(•
' )' ;tcx tcolor(b2); write('•' );textcolor(b3);rite'•') ;

end:

BEGIN

17

clr�cr:
layar utama;
_

repeat for a:=I to 6 do bcgi11 sound(SOO):
delny(l OO);nosound;delay(3000);
konrol(a): end: until kcypsd;
ENU.

18