• text mode for open

    From mutazilah@gmail.com@21:1/5 to All on Fri Oct 21 21:04:15 2022
    I would like PDOS/86, a sort-of MSDOS clone, to have an
    extension which is letting the OS know whether the file
    being opened is being opened in text or binary mode.

    Cygwin has an O_TEXT/O_BINARY extension to the
    Unix open() basically doing the same thing.

    The creat() call has 8 unused bits I could use:

    http://www.ctyme.com/intr/rb-2778.htm

    The open() call has a bit 3 in AL:

    http://www.ctyme.com/intr/rb-2779.htm

    which is reserved which I could use to indicate that
    BX is populated with a fresh set of 16 bits, even
    though I only need 1.

    Any suggestions?

    Thanks. Paul.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mutazilah@gmail.com@21:1/5 to Steve Nickolas on Fri Oct 21 23:07:08 2022
    On Saturday, October 22, 2022 at 1:43:20 PM UTC+8, Steve Nickolas wrote:
    On Fri, 21 Oct 2022, muta...@gmail.com wrote:

    I would like PDOS/86, a sort-of MSDOS clone, to have an
    extension which is letting the OS know whether the file
    being opened is being opened in text or binary mode.

    Cygwin has an O_TEXT/O_BINARY extension to the
    Unix open() basically doing the same thing.

    I feel like this should be handled in the libc, for compatibility, as existing MS-DOS compilers do (in exactly the same way you describe).

    I can still get the libc to generate a CRLF when writing to
    the OS. But once the OS knows that this is a text file, it
    can choose to convert the CRLF into LF if the OS/user wishes.

    Wouldn't that be the ideal?

    BFN. Paul.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Steve Nickolas@21:1/5 to muta...@gmail.com on Sat Oct 22 01:44:53 2022
    On Fri, 21 Oct 2022, muta...@gmail.com wrote:

    I would like PDOS/86, a sort-of MSDOS clone, to have an
    extension which is letting the OS know whether the file
    being opened is being opened in text or binary mode.

    Cygwin has an O_TEXT/O_BINARY extension to the
    Unix open() basically doing the same thing.

    I feel like this should be handled in the libc, for compatibility, as
    existing MS-DOS compilers do (in exactly the same way you describe).

    -uso.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)