Kod:
Pascalda Menü, pencereler ve bir iki ayrıntı


uses crt;
var
tus:char;
i:byte;
label
durum1,durum2,durum3,cikis,yardim,BASH;

procedure sakla; {cursoru saklamak icin }
assembler;
asm
mov ax,$0100 ; mov cx,$2607 ; int $10
end;

procedure saklama; {cursoru cıkarmak icin }
assembler;
asm
mov ax,$0100 ; mov cx,$0506 ; int $10
end;

procedure sil;
begin
clrscr;
end;

procedure git(x,y:byte);
begin
gotoxy(x,y);
end;

procedure aktif;
begin
textcolor(white);
textbackground(blue);
end;

procedure pasif;
begin
textcolor(white);
textbackground(red);
end;

procedure gityaz(x,y:byte; yazi:string);
begin
gotoxy(x,y);
write(yazi);
end;

procedure cerceve(x1,y1,x2,y2:byte; baslik:string);
var
i,j:byte;

begin
for i:= x1+1 to x2-1 do {çerçeve kenarları}
begin
gotoxy(i,y1);
write(chr(205));
end;

for i:= x1+1 to x2-1 do
begin
gotoxy(i,y2);
write(chr(205));
end;

for i:= y1+1 to y2-1 do
begin
gotoxy(x1,i);
write(chr(186));
end;

for i:= y1+1 to y2-1 do
begin
gotoxy(x2,i);
write(chr(186));
end;

gotoxy(x1,y1); {cerceve koseleri}
write(chr(201));
gotoxy(x2,y1);
write(chr(187));
gotoxy(x1,y2);
write(chr(200));
gotoxy(x2,y2);
write(chr(188));

begin {cercevenin icinin boyanmas}

For i:=x1+1 to x2-1 do
begin
j:=y1;
repeat
j:=j+1;
gotoxy(i,j);
write(' ');
until j=y2-1;
end;


gotoxy(x1+2,y1);
write(baslik);

begin {cercevenin icinin boyanmasi}
for i:=y1+1 to y2+1 do
begin
textcolor(black);
textbackground(black);
gotoxy(x2+1,i);
write(chr(176));
textcolor(white);
textbackground(blue);
end;

begin
for i:=x1+1 to x2+1 do
begin
textcolor(black);
textbackground(black);
gotoxy(i,y2+1);
write(chr(176));
end;
textcolor(white);
textbackground(blue);

end;
end;
end; {cerceve prosedurunun sonu...}
end;



begin
BASH:
sakla;
textbackground(white);
clrscr;
aktif;
cerceve(20,10,60,20,' ANA MENU ');

for i:=1 to 80 do
begin
lowvideo;
textbackground(blue);
textcolor(lightgray);
gotoxy(i,25);
write(' ');
end;

git(1,25);
write('ALKoL" 2003');
git(66,25);
write('Yardim icin F1');

aktif;

durum1: {DURUM 1}
pasif;
git(22,12);
write(' ARAC ISLEMLERI ');
aktif;
git(22,13);
write(' PERSONEL ISLEMLERI ');
aktif;
git(22,14);
write(' BOLGE ISLEMLERI ');
aktif;
git(22,16);
write(' CIKIS ');
tus:=readkey;

if tus = chr(59) then goto yardim;
if tus = chr(80) then goto durum2;
if tus = chr(72) then goto cikis;
if tus = #27 then halt else goto durum1;



durum2: {DURUM 2}
aktif;
git(22,12);
write(' ARAC ISLEMLERI ');
pasif;
git(22,13);
write(' PERSONEL ISLEMLERI ');
aktif;
git(22,14);
write(' BOLGE ISLEMLERI ');
aktif;
git(22,16);
write(' CIKIS ');

tus:=readkey;

if tus = chr(59) then goto yardim;
if tus = chr(80) then goto durum3;
if tus = chr(72) then goto durum1;
if tus = #27 then halt else goto durum2;




durum3: {DURUM 3}
aktif;
git(22,12);
write(' ARAC ISLEMLERI ');
aktif;
git(22,13);
write(' PERSONEL ISLEMLERI ');
pasif;
git(22,14);
write(' BOLGE ISLEMLERI ');
aktif;
git(22,16);
write(' CIKIS ');
tus:=readkey;

if tus = chr(59) then goto yardim;
if tus = chr(80) then goto cikis;
if tus = chr(72)then goto durum2;
if tus = #27 then halt else goto durum3;

cikis:
aktif;
git(22,12);
write(' ARAC ISLEMLERI ');
aktif;
git(22,13);
write(' PERSONEL ISLEMLERI ');
aktif;
git(22,14);
write(' BOLGE ISLEMLERI ');
pasif;
git(22,16);
write(' CIKIS ');
tus:=readkey;


if tus = chr(59) then goto yardim;
if tus = chr(80) then goto durum1;
if tus = chr(72) then goto durum3;
if tus = chr(13) then halt;
if tus = #27 then halt else goto cikis;

yardim:
aktif;
cerceve(2,2,55,12,' YARDIM ');
window(3,3,54,11);
write('Buraya yazilacaklar hangi konuda kime yardimi olacak acaba?');
window(1,1,80,25);
tus:=readkey;
if tus = #27 then goto BASH else goto yardim;
readln;
end.