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

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

{$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 '); readln;
write(select('..\*.*'),' Press '); readln;
write(select('*.exe') ,' Press '); readln;

{ 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.

  3 Responses to “Category : Miscellaneous Language Source Code
Archive   : FILESELE.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/