If the Int 21h handler is available,  you can use INT 21 AX=3305. DL is
returned with an integer indicating the boot drive (1=A:, etc.). This works
for MS-DOS 4.0 and later. Given that FreeDOS aims for DOS 6+ compatibility
so that functionality should be there.

-T

On Mon, Oct 5, 2015 at 3:05 AM Joe Forster/STA <[email protected]> wrote:

> Hi guys,
>
> > set /p is a Windows NT feature of CMD.EXE. It was not available in
> > MS-DOS or Windows 9x.
>
> And even in Windows XP, it doesn't support capturing the output of a
> command. A small test batch:
> --- test.bat ---
> @echo off
> set X=
> echo Y | set /p X=
> echo %X%
> ---
> outputs:
> ---
> ECHO is off.
> ---
>
> It works only if the input comes actually from the user (standard
> input?):
> --- test.bat ---
> @echo off
> set X=
> set /p X=X?
> echo %X%
> ---
> outputs:
> ---
> X? <= enter "Y" here
> Y
> ---
>
> > Regarding finding the master environment, in order for FreeDOS to
> > maintain compatibility with MS-DOS and the all the abandoned DOS
> > software out there, FreeDOS has to implement SysVars, commonly called
> > the List of Lists. This list can?t change it?s structure because by
> > doing so, many DOS applications won?t be able to run because a lot of
> > them depend on this ?undocumented? (by Microsoft) structure.
>
> Yup, that would be very nice. I have a DOS program that can reassign
> drive letters: http://sta.c64.org/dlmanip.html which relies _heavily_ on
> these data strutures. I'm not sure if I managed to make it work under
> FreeDOS (new version is not released yet).
>
> Also, while executing config.sys (_not_ autoexec.bat yet), the (master)
> environment variable block is not pointed to anywhere. I've unable to
> finish another DOS program that would record the boot drive into an
> environment variable so that PATH can later be set in autoexec.bat to
> <boot drive>:\[...][;...] (where <boot drive> can be A: for floppy, C:
> for hard disk etc.)
>
> Joe
> --
> KOVÁCS Balázs aka Joe Forster/STA; [email protected]; http://sta.c64.org
> Don't E-mail spam, HTML or uncompressed files! More contacts on
> homepage------------------------------------------------------------------------------
> _______________________________________________
> Freedos-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freedos-devel
>
------------------------------------------------------------------------------
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to