Category : Miscellaneous Language Source Code
Archive   : FILSEL26.ZIP
Filename : FS_CALL.PAS
{$M $4000,0,0}
Uses Dos;
Var TmpStr:String;
InFile:Text;
function hex_word(w:word):string;
const hexstri:string='0123456789ABCDEF';
begin
hex_word[0]:=#4;
hex_word[1]:=hexstri[(hi(w) shr $4)+1];
hex_word[2]:=hexstri[(hi(w) and $F)+1];
hex_word[3]:=hexstri[(lo(w) shr $4)+1];
hex_word[4]:=hexstri[(lo(w) and $F)+1];
end;
function select(TmpStr:string):string;
var stmp:string;
begin
stmp:=TmpStr;
SwapVectors;
Exec('filesele.exe',hex_word(SSeg)+':'+hex_word(Ofs(stmp))+' /P');
Swapvectors;
if doserror<>0
then
begin
writeln('EXEC Selector failure, doserror=', doserror);
write('Enter file name:'); readln(stmp);
end;
select:=stmp;
end;
begin
Writeln(' This is demo program for FILESELE.EXE written in Turbo PASCAL 6.0',#13,#10,
' Press
Readln;
{ Sample of SELECT function usage }
repeat
TmpStr:=select('*.*');
Assign(InFile,TmpStr);
{$I-}
reset(InFile);
{$I+}
if ioresult<>0 then begin
writeln('File ',TmpStr,#13,#10,' NOT found. Probably, you pressed
halt(1);
end;
Writeln('You selected ',TmpStr,#13,#10,'Press
Readln;
while not eof(InFile) do
begin
Readln(InFile,TmpStr);
Writeln(TmpStr);
end;
close(InFile);
Writeln('Choose another file to be listed, or press
'Now press
Readln;
until 3>4;
end.
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/