re: Re: Beta vs. Stable - comments on app/kernel todo list

Eric Auer <[email protected]> Sat, 9 Nov 2002 08:07:39 +0100 (MET)
Newsgroups gmane.os.freedos.devel
Message-ID <[email protected]>
Sorry guys, me again... :-).
(this discussion keeps me far too busy - no time to fix UNDELETE for Linux
with respect to image size detection, nor time left for LBAcache (less DOS
RAM, more XMS and more DISKS planned - other plans with LBAcache may take
much more time...) or DOSFSCK (the infamous DOS protected mode disk driver:
The Linux version could just use lseek and read and write...). Nor the
combined Memory-FAQ.)...

No idea what "Jeremys lists" are, but
(a) COUNTRY is important. I understand the kernel is ready but NLSFUNC
is missing? DRIVPARM and INSTALL are probably less urgent, but at least
DRIVPARM should not be too complicated to do (???). I actually like the
current MENU system, please keep it (at least as a compile time option)
as it is. You could, however, provide a syntax mogrifying tool to turn
MS config.sys into fdconfig.sys... Or try to recognize both syntax versions
at the same time?

(b) FREECOM DIR /Ax and /Ox is, among other reasons, not implemented
because Steffen did not dare to predict how much memory it would need
to allocate (speaking of /O - /A should be easy!). I think you could
solve this by having an external dir.exe which gets run whenever FREECOM
detects not internally supported arguments, like /O...
What was again the use of the /U flag in FORMAT? Save unformatting info?
Hard to do, if you want to save more than a classical "MIRROR" fileset
(FATs, root directory, boot sector). Because the amount of unformatting
info can be quite big.

(c) MEM switches should allow MS syntax in addition to current syntax, I think.
BUFFERS and MASM compatibility are kind of bogus - here, I am for a spec
change (or change BUFFERS behaviour to make -1 the "auto-size" value and +n
the "fixed size n" value, for more MS DOS compatibility).

(d) CHKDSK and DISPLAY.SYS are indeed missing. But what exactly does DISPLAY
do? I think we will soon be able to use SCANDISK and/or DOSFSCK as a CHKDSK
(and provide a wrapper script chkdsk.bat, for example).

(1) I do not know what and why DOS is doing with secondary buffers at all.
The MASM constraint should be dropped or even replaced by "preferably NASM,
other freeware Assemblers are also allowed". Yes, MEM should allow MS syntax.

> > INT 21h/6602h "SET CODEPAGE"
> This one is implemented. There's just no NLSFUNC at the receiving end of
> int2f/ax=1401.

Well, any ongoing NLSFUNC projects? What are the technical specs of NLSFUNC?
(Please do not mail me > 10k zip files or whatever with them :-)).

> We have some int2f/ah=8, ah=12, ah=13, and ah=16 still not implemented
> (maybe some more, it's just that int2f is HUGE)

2f.08 is DRIVER.SYS: driver for various disks, filled with IOCTLs. I guess
      only int 2f ah 8 al 2 is incomplete (25 IOCTLs, plus CD-ROM/CD-DA,
      and "INIT" for European MS-DOS 4.0 adds even more stuff (do I get it
      right that MS-DOS 5.0 and non-European versions do not have/need the
      device helper of RBIL 61 table 02599 ?).
2f.12 Is a bunch of DOS internal commands, manipulating SFT and buffers and
      the like. Plus string manipulation and filename processing. This one
      is indeed huge, and forces you to be quite MSish internally. Programs
      are not supposed to use it, but some may do anyway. Which parts are
      missing in this region?
2f.13 "MS-NET" - no information at all in RBIL 61 apart from "supposedly
      used to move (or control the movement of) NCBs. Does not feel that
      important :-).
2f.14 NLSFUNC - here we got that COUNTRY thing... sub-function 1 is
      "change code page" Will pick and activate an entry of "country.sys",
      documented in RBIL. Takes care of "general info", uppercasing,
      lowercasing, filename uppercasing, filename lowercasing, collating,
      double-byte characters. Seems to be quite feasible. Anybody already
      busy with this? Thanks then!
2f.15 GRAPHICS - yet another thing that we are missing (later versions use
      2f.ac00). Only an installation check. Graphics is supposed to get
      active on hotkey press and print the graphic screen of the very few
      standard CGA, Hercules, EGA and VGA modes on a printer. Would need
      some printer documentation to do this, and some dithering for decent
      quality. However, we can always start with non-dithered 24pin EPSON
      "pseudo standard" as a driver. Anybody working on that one?
2f.15 MSCDEX - we do have this :-).
2f.16 WINDOWS - installation check, some API and virtual device stuff. I do
      not think that FreeDOS is supposed to offer anything here.
      2f.16.10 was XMS 1.x get driver address. 2f.16.1x is also used by
      MS DOS 7, but only for Windows-related things. MS DOS 7 is part of
      Windows 9x, so no surprise. 2f.16.84.bx=0034 is also used by the
      intel plug and play configuration manager, funny...

> and from int21 the following are still missing:
> 4b05h   Set Execution State             active          5.00    planned
Note:   used by programs which intercept AX=4B00h to prepare new programs for
          execution (including setting the DOS version number).  No DOS, BIOS
          or other software interrupt may be called after return from this call
          before commencement of the child process.  If DOS is running in the
          HMA, A20 is turned off on return from this call.
I do not fully get the semantics of this. However, you pass the following
parameters to it: type (exe/overlay), filename, psp segment, initial cs:ip,
size including PSP. Sounds like DOS is supposed to call this, to warn programs
that int 21.4b00 has just loaded something and will do that "jump cs:ip" soon.
Then, programs could hook int 21.4b05 to "breakpoint on execute", for example
for virus checking (or viruses could use it for exactly the same :-)).

> 5d01h   Commit All Files                active          3.10    planned
Flushes buffers for all files off computer X process Y. We could just flush
(write back) all buffers and update all directory entries here (calls int
2f.1107 for remote files). Using the process ID ("Y" above) is probably a
good idea, though.

> 5d02h   Close File by Name              active          3.10    planned
This is for SHARE.EXE: Should therefore be part of SHARE ("error unless
share is loaded, calls [SFT-28h]"). Closes file <fully quallified canonical
name> of process Y on computer X. Sounds feasible...

> 5d03h   Close All Files for Computer    active          3.10    planned
> 5d04h   Close All Files for Process     active          3.10    planned
Also SHARE.EXE, sounds quite normal.

> 5d05h   Get Open File List              active          3.10    planned
Just returns SHARE and SFT data table entries: filename, lock count, owner
(network machine number). Calls [SFT-18h] and requires SHARE to be loaded.

> 5d0ah   Set Extended Error              active          4.00    planned
Modifies the behaviour of Int 21.59 ... It literally sets the register
values that it will return. I think only 21.59.00 is affected. Should be
quite easy to implement.

> + the special delete/rename by wildcard feature from int21/ax=5d00
> ("server call")
Int 21.5d00: Basically passes an int 21 call on to the "server" as is.
Hard to say what the actual implementation should look like. As somewhere
an int 21.41 or int 21.56 gets triggered, THIS is the one that needs to be
worked on, I think.
--------D-2141-------------------------------
INT 21 - DOS 2+ - "UNLINK" - DELETE FILE
        AH = 41h
        DS:DX -> ASCIZ filename (no wildcards, but see notes)
        CL = attribute mask for deletion (server call only, see notes)

Return: CF clear if successful
            AX destroyed (DOS 3.3) AL seems to be drive of deleted file
        CF set on error
            AX = error code (02h,03h,05h) (see #01680 at AH=59h/BX=0000h)

Notes:  (DOS 3.1+) wildcards are allowed if invoked via AX=5D00h, in which case
          the filespec must be canonical (as returned by AH=60h), and only
          files matching the attribute mask in CL are deleted
...
        deleting a file which is currently open may lead to filesystem
          corruption.  Unless SHARE is loaded, DOS does not close the handles
          referencing the deleted file, thus allowing writes to a nonexistant
          file.
        under DR DOS and DR Multiuser DOS, this function will fail if the file
          is currently open

Whatever. Sounds like a findfirst/findnext/unlink loop to me :-).

--------D-2156-------------------------------
INT 21 - DOS 2+ - "RENAME" - RENAME FILE
        AH = 56h
        DS:DX -> ASCIZ filename of existing file (no wildcards, but see below)
        ES:DI -> ASCIZ new filename (no wildcards)
        CL = attribute mask (server call only, see below)
...
Notes:  allows move between directories on same logical volume
...
        open files should not be renamed
...
        (DOS 3.0+) allows renaming of directories
        (DOS 3.1+) wildcards are allowed if invoked via AX=5D00h, in which case
          error 12h (no more files) is returned on success, and both source and
          destination specs must be canonical (as returned by AH=60h).
          Wildcards in the destination are replaced by the corresponding char
          of each source file being renamed.  Under DOS 3.x, the call will fail
          if the destination wildcard is *.* or equivalent ...
...
          When invoked via AX=5D00h, only those files matching the attribute
          mask in CL are renamed.

Well. "The same in green" compared to 21.41 ... Need to add the target file
renaming logics, though. Check the FreeCOM "ren" sources for inspiration.

> + a few DOS 7+ calls dealing with IOCTLs and access/creation times/dates.
Our goal is DOS 5 compatibility as far as I remember. Implementing the DOS
7 type accesss/creation timestamp stuff will however improve VFAT support,
and as we support even FAT32, this seems to be a nice idea. Not extremely
hard to implement I think.

Eric