Category : Miscellaneous Language Source Code
Archive   : FILSEL26.ZIP
Filename : FS_CALL.PAS

 
Output of file : FS_CALL.PAS contained in archive : FILSEL26.ZIP
{ Demo for FILESELE.EXE by Andy & Cow (1992), source coding }

{$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 to continue and choose a file to be listed on your screen.',#13,#10);
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 to exit Selector.');
halt(1);
end;

Writeln('You selected ',TmpStr,#13,#10,'Press to list this file');
Readln;

while not eof(InFile) do
begin
Readln(InFile,TmpStr);
Writeln(TmpStr);
end;
close(InFile);

Writeln('Choose another file to be listed, or press in selector to stop.',#13,#10,
'Now press or Ctrl-Break');
Readln;
until 3>4;
end.


  3 Responses to “Category : Miscellaneous Language Source Code
Archive   : FILSEL26.ZIP
Filename : FS_CALL.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. 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/