uses resource, memory, crt, dos;

var
i,n, sizetext:word;
fw1:file;
fr:file of byte;
b:byte;

begin
SetUpVirtual(scr,vaddr);
SetUpVirtual(scr2, vaddr2);
SetUpVirtual(scr3, vaddr3);

Assign(fr, 'text.txt');
Reset(fr);
sizetext:=filesize(fr);
Close(fr);

LoadBin('text.txt', sizetext, vaddr);


Assign(fw1, 'text.cry');
Rewrite(fw1,1);
Reset(fw1, 1);
n:=0;
for i:=1 to sizetext do begin

   b:=mem[vaddr:n] xor 13;
   BlockWrite(fw1, b, 1);
   inc(n);
end;
Close(fw1);

Writeln(sizetext);
end.