Bios calls in Python?

Dr. Faustus faustus at pureevil.org
Fri Jun 8 09:36:16 EDT 2001


m.bless at gmx.de (Martin Bless) wrote in message news:<3b1fdb3b.472708 at news.muenster.de>...

> Are you sure? Does that mean my oh so very important dos application
> (no joke) won't run with XP any more?

My bad.  Let me back off of my statement a bit.

If it was an INT 21 function that was supported under DOS, then it
will definitely be supported under NT/2K/XP when run from a 16-bit
process.

If it was an INT 21 function that was added for Windows 95 (ie for
long file name support) then it will probably be supported under
NT/2K/XP when run from a 16-bit process.

I don't believe that *either* of these categories are supported in
a 32-bit process, because it's NTVDM.EXE that implements the 16-bit
interrupt functions, and that wouldn't be available in a 32-bit
process.  As I assumed you would be running Python as a 32-bit
process under NT :), it didn't occur to me that you might have
built it for DOS support and be running it as a 16-bit process.

HOWEVER, I have not actually tried to verify this, and for all
I know, a 32-bit process might indeed be able to issue int 21
calls under NT.

> Unfortunately IT'S NOT GetFullPathName. The business is not expanding
> from relative to absolute, like in:
>    win32api.GetFullPathName('m:\\')  ->  'm:\\'
> 
> but from substituted to unsubstituted:
>    rem Working dos example:
>    m:>truename  m:\x.bat     ->  c:\somewhere\x.bat

If the DOS functions you were using is int 21, fn 7160, then
GetFullPathName is the official alternative.  Of course, the
SubstExpand flag is available in the int 21 version and not
in the API call, but then SUBST isn't supported through any
official Win32 APIs anyway.  For that matter, SUBST has been
on a death watch since the early 90s.

--
Dr. Faustus
faustus at pureevil.org



More information about the Python-list mailing list