i : integer;

begin

if (Source<=MaxPage) and (Destin<=MaxPage) then for i := 0 to MaxLine-1 do begin

MoveFromScreen (Mem [VMemory :VSi2e*Source+i*Ma.xChar*2] ,buf,MaxChar*2) ;

MoveToScreen(buf,Mem[VMemory:VSize*Destin+i*MaxChar*21,MaxChar*2) end end /SwapPage];

I Подпрограммы управления окнами 1 *———————————————————.——————————*;

Procedure ChangeWindAttribute(Page,01dAtt,NewAtt: Byte);

{Заменяет в окне атрибут OLDATT на значение NEWATTf var

X1,Y1,X2,Y2: Byte;

begin

if Page<=MaxPage then with Pages[Page] do begin

XI Lo(WBondUp) ;

Yl := Hi(WBondUp) ;

X2 := Lo(WBondDown)+2;

Y2 := Hi(HBondDown)+2;

ChangeAttribute(Page,XI,Yl,X2,Y2,OldAtt,NewAtt) end

end; {ChangeWindAttribute} ^———————————————/

Procedure CopyWind(Page,X,Y: Byte; var Buf;,LX,LY: Byte);

{Переносит копию окна из яамяги на страницу} var

X2,Y2,k: Byte;

Size: Word;

В: array [O.-MaxInt] of Byte absolute Buf;

begin

if (X in [1..MaxChar]) and (Y in [1..MaxLine]) and (Page<=MaxPage) then with Pages[Page] do begin

X2 := X+LX-1;

if X2>MaxChar then X2 := MaxChar;

Y2 := Y+LY-1;

if Y2>MaxLine then У2 := MaxLine;

Size := (X2-X+1)*2;

for k := У to Y2 do

MoveToScreen(B[(k-Y)*LX*2],Mem[VMemory:Page*VSize+ (pred(k)*MaxChar+X-l)*2],Size) ;

WBondUp := X+Y shi 8;

WBondDown := X2-2+(Y2-2) shi 8;

if Page=ActivePage than

SetActivePage(Page) end

end; (Copy Wind} ^_————_————————_—;

Procedure GetWindow (Page: Byte);

(Восстанавливает состояние экрана, бывшее перед обращением к процедуре PUTWIVDOW} var

X,Y,U,D: Byte;