Hi, I exchanged some mails with Udo from DR DOS improvement project,
and the conclusion might be that FreeDOS is not missing much for 386Enh
compatibility - it only has one thing too much: fnodes.

- DR DOS does not support int 2f.1603, so there is no ADDITIONAL instance data
- DR DOS supports int 2f.1607.15 in quite "spartanic" way:
  - the kernel is instanced and has version (probably reported as 5.0 class),
    InDOS flag, User ID word (seems to be "current PSP seg"), "CritPatch table"
    (in DOS 4+ this is only one byte at dosds:0d0c which is 0 or non-0 to dis-
    or en-able critical sections, categories are kernel/share/dosmgr,
    kernel/dosmgr/devicecalls, netdrives, ifsfunc, assign, cdrom, ibmlan, but
    obviously we only have to support a few of them to get started. The list
    of offsets (all to be d0c, 0-terminated) is to be at SDA[-11]...)
    There are also SAVEDS / SAVEBX, where DS and BX are saved during int 21
    as far as I can tell. And an UMB_HEAD segment, of course.
  - the kernel just PRETENDS to follow patch requests. It just returns an ack
    when you ask it to: enable critical section processing, disable user ID
    set/check (in "commit file by task/machine"?), make int 21.3f for stdin a
    polling loop, trap a stack fault in win386 sysinit, or trap DJ message.
    The stack fault simply does not happen in DR DOS and DJ message thing is
    handled by calling int 2f.4a00.... (see RBIL) before displaying the
    message / waiting for a key: This gives Win the chance to return "already
    done the user interaction", which makes DOS skip the message display and
    key waiting.
  - patch removal is dummy, as it is with MS DOS
  - get size of data structure is not supported (in MS DOS, it is only supp.
    for "get size of CDS")
  - get instance data structure just returns 0f (all of: CDS, SFT, devlist,
    SDA are instanced!?)
  - get device driver size returns the size of the memory block for the
    given segment, as far as I understand.

So what is missing in FreeDOS?

  - do we have SAVEDS / SAVEBX variables? Should be easy to add for kernel
    experts.
  - we should support critical sections, do we? If so, the "crit patch table"
    at SDA[-11] should be trivial. InDOS is already supported. UMB_HEAD must
    already be somewhere in FreeDOS anyway, should be easy to add to the
    DOSMGR patch table.
  - not sure what to do about that User ID stuff and whether it is important.
  - we could add a list of kernel state relevant data areas to the instanced
    data list, by providing int 2f.1603 ... What are the candidates? The MS
    compatible CDS / SFT / devlist / SDA can be instanced simply by "return 0f"
    anyway. One candidate would be the keyboard readline buffer, for example.
  - DJ mechanism user interaction should be suppressible. Should be easy by
    adding a call to int 2f.4a... as described above and in RBIL.
  - I assume that "get dev size" should be straightforward, too.
  - Win, probably even for opening standard mode DOS boxes (*swap exe), will
    want to mess with SFT. Because of that, fnodes must not trust the SFT to
    stay in sync. Would it be possible to regenerate fnodes if their SFT
    entry fails to checksum okay (checksum to be stored in fnode)?

Note that I am no too big kernel expert, and that the above description adds
a lot of guesswork to the rough descriptions of DR DOS behaviour from Udo. So
I would be very happy to get expert comments on all the "what is missing in
FreeDOS?" items. Thanks!

The binary code sequences which Win tries to patch seem to be not important,
but it would be an option to include them in the kernel as data arrays if
Win should turn out to insist on their presence. See my other mail about that.

Eric

PS: As told in the other mail, int 2f.1603 returns as list of instanced data
items: dosds:22,2 (LoL[-4]), dosds:1f9,106 (readline buffer?), dosds:32,4
(LoL[0c]), dosds:300,1 (readline cursor?), dosds:fc0,22 (unknown but mostly
static data structure, seems to be present in DR DOS as dummy?), 70:c,1 (?).
The offsets of saveds/savebx are 5ec/5ea, userid 33e, crit patch table 315
(contents d0c d0c d0c d0c 0), umb head 8c. All values for MS DOS int 2f.1603!



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to