Category : Miscellaneous Language Source Code
Archive   : FILESELE.ZIP
Filename : FS_CALL.PAS
Output of file : FS_CALL.PAS contained in archive : FILESELE.ZIP
{$M $4000,0,0}
uses dos;
var tmpstr:string;
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
{ Samples of usage }
write(select('*.*') ,' Press
write(select('..\*.*'),' Press
write(select('*.exe') ,' Press
{ Sample for direct usage, without function select }
tmpstr:='f*.*';
SwapVectors;
Exec('filesele.exe',hex_word(DSeg)+':'+hex_word(Ofs(tmpstr))+' /P');
Swapvectors;
writeln(tmpstr);
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/