Does anyone know when the TEMP variable was introduced into MS-DOS? Furthermore, does MS-DOS ever use the variable internally (like it does with the DIRCMD or PATH environment variable)?
The MS-DOS API appears to have a call to create a temporary file (int 21h, call 5ah), but I'm not certain if it uses TEMP, and it doesn't work for DOS 2.0 (one of my targets). Long story short, I'm trying to create a DOS-agnostic program (besides 1.0, which is worthless), but by design it needs to create a temporary file.
I could always just use getenv() in dos.h to get the value of TEMP, but I'm wondering if the DOS kernel provides services to automatically create the file in TEMP (feels more "proper"). Does anyone know what other programs did when they wanted to create a TEMP file?
The MS-DOS API appears to have a call to create a temporary file (int 21h, call 5ah), but I'm not certain if it uses TEMP, and it doesn't work for DOS 2.0 (one of my targets). Long story short, I'm trying to create a DOS-agnostic program (besides 1.0, which is worthless), but by design it needs to create a temporary file.
I could always just use getenv() in dos.h to get the value of TEMP, but I'm wondering if the DOS kernel provides services to automatically create the file in TEMP (feels more "proper"). Does anyone know what other programs did when they wanted to create a TEMP file?
Last edited: