• text mode for open

    From muta...@gmail.com@mutazilah@gmail.com to comp.os.msdos.programmer on Fri Oct 21 21:04:15 2022
    From Newsgroup: comp.os.msdos.programmer

    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.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Steve Nickolas@usotsuki@buric.co to comp.os.msdos.programmer on Sat Oct 22 01:44:53 2022
    From Newsgroup: comp.os.msdos.programmer

    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.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From muta...@gmail.com@mutazilah@gmail.com to comp.os.msdos.programmer on Fri Oct 21 23:07:08 2022
    From Newsgroup: comp.os.msdos.programmer

    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.
    --- Synchronet 3.21d-Linux NewsLink 1.2