Discussion:
text mode for open
(too old to reply)
muta...@gmail.com
2022-10-22 04:04:15 UTC
Permalink
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.
Steve Nickolas
2022-10-22 05:44:53 UTC
Permalink
Post by ***@gmail.com
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.
muta...@gmail.com
2022-10-22 06:07:08 UTC
Permalink
Post by Steve Nickolas
Post by ***@gmail.com
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.

Loading...