Hi guys.

Thanks for the response, replying to the various points together.


> 0    standard input

> basically you are telling the STdiN device 0, that is no longer standard
input.

Yes, which is why in my original message I said:

>> Using 1 or 81h gives the same result.


ie I tried two ways to make stdin stdin.

I agree I could have made that more explicit.

Also I said this:

>> Note that the original real code does a get device
>> info first, and has a device information word of 0,

So (unless I stuffed the test up), it's not just me that says
that stdin isn't stdin - Freedos get device info returns 0.
So freedos reports that stdin is not stdin, and I took its
word for it in my test of set device info.

> Looking at this again, I think I see what your problem might be.
> You have commented out the "mov dx, 081h"

Yes, which is why I said:

>> Using 1 or 81h gives the same result.

ie I used 0 (giving Freedos back what it gave me), but I also tried 1,
ie at least telling stdin that it is stdin, even though Freedos says it
isn't. And I also tried x'81' to say that it was stdin, plus "a device",
in case that was what Freedos wanted from me so that this call
would succeed. I'm not an expert on this, and didn't claim to be,
and I haven't yet attempted to find out what the official values
from MSDOS are. I was hoping that you guys (with an actual
working MSDOS-compatible system, as opposed to mine which
is a beta demo), would know the proper bit settings for stdin
and tell me which one I got wrong.

And again - it's not just me who got it wrong - Freedos get
device info gets it wrong too (again disclaimer - I may have
stuffed up the test and if you need me to I can isolate my
get device info (21H/4400H) test case and do another independent
bug report on that if I can't see anything wrong with my new
small test).

> BTW, this also brings up the importance of commenting your code.

The comments were in the problem report. I had thought that
was sufficient. This is throwaway code. My real code is here:

https://sourceforge.net/p/pdos/gitcode/ci/master/tree/pdpclib/dossupa.asm

and some other files in pdpclib. I spent effort to isolate the
fault to this and create a simple test case.


> if anything, use it like

>  device information word = get information(handle)
>  device information word |= 0x98
>  set information(handle,device information word)

And that is exactly what I do, which is why I said:

>> Note that the original real code does a get device
>> info first, and has a device information word of 0,
>> but I may have stuffed that test up.

Maybe that English is not clear enough either. I'm a
programmer. English is like my 5th language (after C,
6502 assembler, 370 assembler and x86 assembler).


> I personally can't think of a good reason to ever want to
> change a devices attributes, but there may be some special
> case I can't see right now.  But I can see no reason to ever
> change the attributes of any standard device (STDIN,
> STDOUT, STDERR, etc.).

The reason is to switch off cooked/canonical mode and get
into raw mode, as well as switching off echo. The real use
case can be found here:

https://sourceforge.net/p/pdos/gitcode/ci/master/tree/pdpclib/stdio.c

#elif defined(__MSDOS__)
        if (stream == stdin)
        {
            unsigned int dw;

            __devginfo(0, &dw);
            dw &= 0xff;
            dw |= (1 << 5);
            __devsinfo(0, dw);
        }
#endif


I'm not sure whether I have tested this code except under
PDOS/86 which isn't a real test as it is a circular argument.

That's why I had a disclaimer.


At this point it is unclear to me if this has been accepted as
a bug report as I am getting mixed messages.

Also I don't know whether more information is required from me.

Especially I need to know whether you believe get device info
is working correctly, or whether you want me to do a more formal
test and presumed bug report, or whether you will check the
behavior of both yourselves against MSDOS to ensure that
Freedos is MSDOS-compatible, as you would presumably want
to do if you accept the set (as opposed to get) device info as a
bug report.

Please let me know where I stand.

Thanks. Paul.
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to