[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More fun with Freed Z80
Hi!
Thanks but I prefer Pascal. My version is VERY inelegant but I
know I'll be able to understand it the next time I look at it.
Willi
My
version*******************************************************************
program strip;
{ Remove high order bit of all characters in an ASCII text file }
var buff: char;
inName, outName: string[64];
inFile, outFile: text;
begin
write('Name of input file? ');
readln(inName);
assign(inFile, inName);
reset(inFile);
write('Name of output file? ');
readln(outName);
assign(outFile, outName);
rewrite(outFile);
repeat
read(inFile, buff);
buff := chr(ord(buff) and $7F);
write(outFile, buff)
until eof(inFile);
close(inFile);
close(outFile)
end.