Скачиваний:
34
Добавлен:
01.05.2014
Размер:
1.33 Кб
Скачать
{ "ЋЇҐа жЁ®­­лҐ баҐ¤л Ђ‘Ћ€“" 2003 Ј®¤
‹ Ў®а в®а­ п а Ў®в  3
Ја. 9331 }
Program Lab3;

{$F+}

Uses Corout,CRT,Dir_Scr;

Procedure myDelay; { Њ Ґ¬бп ¤гамо ;) }
Var I,X : LongInt;
Begin
For I:=1 to 1000000 do
X := Round(3/2);
End;

{-----------------------------------------------------}
Procedure P1; far;
Begin
while true do begin
DirectS.Out('1');
myDelay;
end {while};
End {P1};
{-----------------------------------------------------}
Procedure P2; far;
Begin
while true do begin
DirectS.Out('2');
myDelay;
end {while};
End {P2};
{-----------------------------------------------------}
Procedure P3; far;
Begin
while true do begin
DirectS.Out('3');
myDelay;
if KeyPressed then
if ReadKey = #27 then
Begin
Writeln('‚л室 Ї® Є« ўЁиҐ ESC!');
ReadyList.Stop_Manager;
End;
End {while};
End {P3};
{-----------------------------------------------------}
Begin
ClrScr;
Writeln('„®бвгЇ­® Ї ¬пвЁ ў ­ з «Ґ: ',MemAvail);
{}
ReadyList.Init;
{}
ReadyList.Add_New_Process(p1);
ReadyList.Add_New_Process(p2);
ReadyList.Add_New_Process(p3);
{}
ReadyList.Run_Manager;
{}
ReadyList.Done;
{}
Writeln('„®бвгЇ­® Ї ¬пвЁ ў Є®­жҐ: ',MemAvail);
End.
Соседние файлы в папке LAB3