Организация параллельной работы нескольких процессов. Описание процедур, страница 5

my_interface_S:char;

begin

my_interface_S:='+';{#178[1]}

textcolor(blue);

for my_interface_i:=1 to 24 do writeln(my_interface_S);

gotoxy(1,1);

for my_interface_i:=1 to 79 do write(my_interface_S);

for my_interface_i:=1 to 24 do begin

gotoxy(79,my_interface_i);

write(my_interface_S);

end;

gotoxy(1,24);

for my_interface_i:=1 to 79 do write(my_interface_S);

gotoxy(1,3);

for my_interface_i:=1 to 79 do write(my_interface_S);

gotoxy(1,22);

for my_interface_i:=1 to 79 do write(my_interface_S);

gotoxy(1,12);

for my_interface_i:=1 to 79 do write(my_interface_S);

for my_interface_i:=3 to 22 do begin

gotoxy(59,my_interface_i);

writeln(my_interface_S);

end;

for my_interface_i:=12 to 20 do begin

gotoxy(29,my_interface_i);

writeln(my_interface_S);

end;

gotoxy(1,20);

for my_interface_i:=1 to 59 do write(my_interface_S);

end;

{===========================================================================}

procedure my_help;

begin

gotoxy(2,21);textcolor(yellow);write('Buffer');

textcolor(yellow);gotoxy(2,13);write('Producter');

textcolor(yellow);gotoxy(30,13);write('Consumer');

textcolor(green);

gotoxy(60,4);write('ESC-');textcolor(red);write('Exit from kurs');

textcolor(green);

gotoxy(60,5);write('Z-');textcolor(red);write('Letalka');

textcolor(green);

gotoxy(60,6);write('S-');textcolor(red);write('Stroka');

textcolor(green);

gotoxy(60,7);write('C-');textcolor(red);write('Clock');

textcolor(green);

gotoxy(60,8);write('K-');textcolor(red);write('Producter');

textcolor(green);

gotoxy(60,9);write('L-');textcolor(red);write('Consumer');

gotoxy(62,10);textcolor(red);write('Chng Spd');

gotoxy(54,10);textcolor(red);write('Speed');

textcolor(lightblue);

gotoxy(71,5);write(':');write('u,o i,p');

gotoxy(71,6);write(':');write('[   ]');

gotoxy(71,7);write(':');write('none');

gotoxy(71,8);write(':');write('q   w');

gotoxy(71,9);write(':');write('e   r');

gotoxy(71,10);write(':');textcolor(blink+lightblue);write('-   +');

end;

{===========================================================================}

Procedure  SetCurSize(BegLine, EndLine: Byte);

Var Regs:Registers;

Begin

With Regs Do

Begin

AH:=$01;

CH:=BegLine;

CL:=EndLine;

End;

Intr($10,Regs);

End;

{===========================================================================}

{===========================================================================}

BEGIN

mark(p);

clrscr;

Randomize;

setcursize($20,$00);

s_end:=1;

n1:=1;n2:=1;n3:=1;n4:=25;n5:=25;

t1:=0;t2:=0;t3:=0;

vx:=1;vy:=1;x:=10;y:=10;

my_stroka_i:=15;

i:=2;

number:=1;

count:=0;

Kvant[0]:=random(50);

Kvant[1]:=random(50);

name:='Sizjih Stanislav Dmitrievich*=*P-31*=*V-19';

for ii:=1 to size do  buf[ii]:=0;

{===========================================================================}

Val(paramstr(1),stroka,code1);

Val(paramstr(2),XC,code2);

Val(paramstr(3),YC,code3);

Val(paramstr(4),ReloadSize,code4);

{===========================================================================}

error_check;

my_interface;

my_help;

{===========================================================================}

gotoxy(26,13);

textcolor(13);

write(':',Kvant[0]:2);

gotoxy(55,13);

textcolor(13);

write(':',Kvant[1]:2);

{===========================================================================}

GetTime(Hour,Min,Sec,Hund);

Counter:=(1/Hund)*18.2;

ReloadCounter:=(1/Hund)*18.2;

GetIntVec($9,@my_kbrd_Old);

GetIntVec($8,@my_rule_Old);

SetIntVec($8,Addr(my_rule));

SetIntVec($9,Addr(my_kbrd));

Exxxxxit:= False;

repeat

until Exxxxxit;

setcursize($06,$07);

dispose(p);

keep(0);

end.

Приложение.