Re: [Freedos-devel] Application to check DOS API compatibility

2019-06-11 Thread Rugxulo
Hallo,

On Sat, Jun 8, 2019 at 12:27 PM Tom Ehlert  wrote:
>
> >> Of course, you could just always rather test the "big dogs" of the DOS
> >> world:  Turbo C, Lotus 1-2-3, Doom, QBASIC, etc  I don't know of a
> >> good list of tools off-hand, but obviously things like DJGPP or
> >> OpenWatcom or FASM (or maybe small *nix utils like sed) might make for
> >> good tests.
> of course obviously not.

Even if the compilers themselves aren't good tests, you can make
better tests with them. As long as the compiler runs successfully,
then you can go from there. It's not as trivial as it seems.
(Ironically, most compilers aren't very portable. Strange, I know.)

> Turbo C *compiler*, OpenWatcom, FASM, sed  all just call mostly
> trivial file I/O routines (open, read sequential, write sequential, close), 
> which even the
> most trivial implementation should support. no interesting functions
> are used (or needed) by a compiler.

fseek() is more crucial than you think. Maybe not for sed (which also
doesn't support directories, but neither does ISO C sans POSIX), but
for other utils there's still other features (temp files, dynamic
memory management, file attributes, date/time) which can be
problematic. Although I haven't looked, I wouldn't be surprised if a
HLL linker needed such "extensions".

Actually, different sed implementations may or may not use malloc() at
all. So that's one glaring difference (among a billion others). So you
always have to test all available implementations instead of assuming
"yup, standard! that means it automatically works!" like a doofus.

Yes, sed is simpler than AWK (which is simpler than Perl, etc. etc.),
but it's still complicated enough to trip someone up. (Even Csed, my
favorite, has bugs ... beyond the default file buffering quirk. You
just have to test your scripts on all available implementations
thoroughly before assuming anything. I prefer code that tries to avoid
being locked to specific vendors or versions, even if it's more effort
on my end.)

> FreeCOM itself is a *much* better test as you can exercise a good part
> of DOS functions with it.

Perhaps something like XCOPY or DELTREE might be another good test.
FreeCOM doesn't really do that.

Though a DEBUG (.BAT) script is probably the simplest way to test a
single API function.

Oh, FD Touch had some fallback code for older DOS v2. Funny! (And I
think shareware A86 claimed to not require beyond v2 either.)


___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Application to check DOS API compatibility

2019-06-09 Thread Mercury Thirteen via Freedos-devel
Thanks! I've never seen this program, but methinks it shall be very useful.

On Saturday, June 8, 2019 10:31 AM, TK Chia u1049321...@caramail.com wrote:

> Hello Rugxulo, hello Mercury 13,
>
>> Of course, you could just always rather test the "big dogs" of the DOS
>> world: Turbo C, Lotus 1-2-3, Doom, QBASIC, etc  I don't know of a
>> good list of tools off-hand, but obviously things like DJGPP or
>> OpenWatcom or FASM (or maybe small *nix utils like sed) might make for
>> good tests.
>
> I think Spinellis's system call tracer
> (https://www.spinellis.gr/sw/ports/trace/) might be a good adjunct to
> such test programs. It can help give an idea of the DOS system calls
> which are covered by a particular run of a program.
> However, the tracer does not handle calls to the BIOS, even though the
> BIOS is also quite an important part of the ABI for DOS programs.
> Thank you!
> ---
>
> https://github.com/tkchia
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Application to check DOS API compatibility

2019-06-08 Thread Antony Gordon
Hi,

There are some “unofficial” tests for genuine MS-DOS that can be used (within 
reason) to establish a “level” playing field for DOS. Microsoft used these 
methods as a part of the AARD code hidden in the Windows 3.1x startup program.

Undocumented DOS discusses the AARD code somewhat in detail. Generally 
speaking, the DOS API does experience some changes over it’s lifetime from 
about 2.0 until 6.22 although I believe after 5.0 it remained mostly unchanged.

-T

> On Jun 2, 2019, at 11:36 PM, Mercury Thirteen via Freedos-devel 
>  wrote:
> 
> Darn. I was hoping that, in light of the early MS-DOS clone market, there was 
> something maybe released by a third party to help users determine if their 
> DOS was MS-DOSsy enough. A reach, I know, but... oh, well. If I end up making 
> one, I'll certainly share! :)
> 
> Night is coming along well so far, and I'm trying my best to minimize 
> slipping the development schedule. Hopefully we'll be on track next year to 
> start test-running the first small .COM executables before later moving on to 
> EXE and even ELF binaries. 
> 
> 
> Sent with ProtonMail  Secure Email.
> 
> ‐‐‐ Original Message ‐‐‐
> On Saturday, June 1, 2019 3:18 PM, Jim Hall  wrote:
> 
>> Not that I'm aware of. Such a thing has never really been needed, since 
>> MS-DOS was always the gold standard, and Microsoft set the goalposts for 
>> most of DOS history. A "compatibility check" tool would have had to come out 
>> of Microsoft, but I can't see they would have been motivated to create a 
>> product to help others create competing DOS implementations.
>> 
>> Would be neat, though. If you write a tool to do this, please share it. You 
>> can use the RBIL as the basis for DOS interrupts.
>> 
>> I assume the NightDOS kernel is doing well, then? 
>> https://groups.google.com/forum/#!topic/night-dos-kernel/PaPrNIvVWyo 
>> 
>> 
>> 
>> 
>> On Sat, Jun 1, 2019 at 2:08 PM Mercury Thirteen via Freedos-devel 
>> > > wrote:
>> Hello all,
>> 
>> Ultimately, I'm looking for an application which can probe the DOS function 
>> calls on a given system and report how "compatible" the current system is, 
>> perhaps presenting a list of what DOS functions have successfully returned 
>> legitimate output. E.g. "Your DOS implementation supports interrupt 
>> functions X and Y but not Z."
>> 
>> I understand that in reality there may be no application which does exactly 
>> this... but perhaps in all of the collective knowledge here someone knows of 
>> a program to do something close? Thanks in advance!
>> 
>> 
>> Sent with ProtonMail  Secure Email.
>> 
>> ___
>> Freedos-devel mailing list
>> Freedos-devel@lists.sourceforge.net 
>> 
>> https://lists.sourceforge.net/lists/listinfo/freedos-devel 
>> 
> 
> ___
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel

___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Application to check DOS API compatibility

2019-06-08 Thread Tom Ehlert


 Hello Rugxulo, hello Mercury 13,  hello TK Chia,

>> Of course, you could just always rather test the "big dogs" of the DOS
>> world:  Turbo C, Lotus 1-2-3, Doom, QBASIC, etc  I don't know of a
>> good list of tools off-hand, but obviously things like DJGPP or
>> OpenWatcom or FASM (or maybe small *nix utils like sed) might make for
>> good tests.
of course obviously not.

Turbo C *compiler*, OpenWatcom, FASM, sed  all just call mostly
trivial file I/O routines (open, read sequential, write sequential, close), 
which even the
most trivial implementation should support. no interesting functions
are used (or needed) by a compiler.

Turbo C *IDE*, QBASIC :   some video I/O. a bit more
interesting, but not too much.

Doom: requires DOS-32. many years ahead for NightDOS.


FreeCOM itself is a *much* better test as you can exercise a good part
of DOS functions with it.

just make it run, and I will provide some batch files that will tell
you that night is not just compatible yet.

in addition, there are a lot of 'undocumented DOS' utilities floating
around that test some aspects of DOS. MSD.EXE will also help.



> I think Spinellis's system call tracer
> (https://www.spinellis.gr/sw/ports/trace/) might be a good adjunct to
> such test programs.  It can help give an idea of the DOS system calls
> which are covered by a particular run of a program.

I wasn't aware of this, and this would have been a really useful tool
in debugging FreeDOS. Too late, but still useful (going by the
description only).


> However, the tracer does not handle calls to the BIOS, even though the
> BIOS is also quite an important part of the ABI for DOS programs.

Of course.
and doing interesting things with the LOL. (List Of List,
not Laughing Out Loud ;)

This being said, Night 'DOS' is still *very* much in development.

So far they have a keyboard interrupt handler, a routine to read
sectors in PIO mode, a function to print primary partitions, and a
timer interrupt that switches the (integer) registers of some 'tasks'.

the need for compatibility testing software is some years ahead.

Tom



___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Application to check DOS API compatibility

2019-06-08 Thread TK Chia

Hello Rugxulo, hello Mercury 13,


Of course, you could just always rather test the "big dogs" of the DOS
world:  Turbo C, Lotus 1-2-3, Doom, QBASIC, etc  I don't know of a
good list of tools off-hand, but obviously things like DJGPP or
OpenWatcom or FASM (or maybe small *nix utils like sed) might make for
good tests.


I think Spinellis's system call tracer
(https://www.spinellis.gr/sw/ports/trace/) might be a good adjunct to
such test programs.  It can help give an idea of the DOS system calls
which are covered by a particular run of a program.

However, the tracer does not handle calls to the BIOS, even though the
BIOS is also quite an important part of the ABI for DOS programs.

Thank you!

--
https://github.com/tkchia


___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Application to check DOS API compatibility

2019-06-07 Thread Rugxulo
Hi,

On Sun, Jun 2, 2019 at 11:37 PM Mercury Thirteen via Freedos-devel
 wrote:
>
> Darn. I was hoping that, in light of the early MS-DOS clone market, there was 
> something maybe released by a third party
> to help users determine if their DOS was MS-DOSsy enough. A reach, I know, 
> but... oh, well. If I end up making one, I'll certainly share! :)

This always happens for systems (or compilers or languages or ...).
End users (or implementers, aka cloners??) have to do most of it
themselves to fill in the gaps. "Dark corners", as they say.

(Unrelated but similar compatibility links mentioned here, for loose
comparison):

* https://www.standardpascal.com/p5.html
* https://news.ycombinator.com/item?id=19237527=hvper.com
* https://github.com/alexfru/SmallerC/tree/master/v0100/tests
* http://sed.sourceforge.net/local/tools/sedcheck.sed.html

Yes, there were a lot of MS-DOS clones, but no, none of them really
cared much about sharing public information. If anything, I'd say they
dropped the ball, and FreeDOS was left to pick up the pieces. I'm very
grateful that FreeDOS exists, but in some ways it's shunned because
it's too platform (x86 + BIOS) specific. To some, that lessens the
value, but "more portable" systems also have many heavy dependencies.

Several years ago, I bought used a small book (roughly 120 pages)
titled _MS-DOS Functions_ (by Ray Duncan). I never did much with it,
but it's a cool reference. You can find used copies on Amazon fairly
cheaply. It may not be the test program you want, but it's pretty good
at listing compatibility (up through MS-DOS 3.3, which is "classic",
IMHO).

It might actually be better to have many small programs rather than
one large test program. You know, test character I/O, file operations,
memory management ... each tested by a separate util.

Of course, you could just always rather test the "big dogs" of the DOS
world:  Turbo C, Lotus 1-2-3, Doom, QBASIC, etc  I don't know of a
good list of tools off-hand, but obviously things like DJGPP or
OpenWatcom or FASM (or maybe small *nix utils like sed) might make for
good tests.

The standard (ISO) libc from *nix is pretty much what functionality
many OSes tried to support (with a few exceptions). Obviously DOS
lacks some things, as do many systems, but the "standard" (simple?)
stuff can be tested. Maybe that should include POSIX (which?)
functions, too.

Take a look at documentation for DJGPP's (POSIX) libc or Free Pascal's
(TP) units.

* http://www.delorie.com/djgpp/doc/libc/
* https://www.freepascal.org/docs-html/rtl/dos/index.html


___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Application to check DOS API compatibility

2019-06-03 Thread Bret Johnson
I personally think you're barking up the wrong tree.  Not only would such a 
thing be impractical to implement, there would be no pragmatic benefit to it 
that I can see.  Even different versions of MS-DOS have different 
characteristics and features that would make such a program difficult, if not 
really impossible, to fully implement. I think the best you could do would be 
to limit the scope to a small number of critical compatibility features that 
you consider "important", but your "important list" will undoubtedly be 
different than someone else's.  RBIL is pretty much the de facto  "gold 
standard" for list of features (including undocumented features) and 
compatibility issues that have been discovered thus far, but even it hasn't 
been updated in a LONG time. Even if you start with RBIL, though, you would 
still need to check your program against real version(s) of MS-DOS and not 
necessarily have 100% faith in RBIL.  In addition, even if you find official MS 
documentation on how things are SUPPOSED to work (which is unlikely since MS 
never really did publicly document the DOS design requirements) you can't 
necessarily believe that's the way it really DOES work -- MS-DOS has bugs in 
it, too.  Plus, when you start adding in device drivers and TSR's and memory 
extensions (whether from MS or somewhere else) the testing problems compound. 
This is reminiscent of what the USB group has tried to do with USB 
compatibility tests.  They've produced a compatibility test suite, but it only 
works on Windows.  So, it depends on the underlying Windows USB foundation 
built into the Operating System to even get started.  However, it is well known 
that Windows itself is not compliant with the USB standards, which really makes 
the compatibility tests invalid.  In the end, the way the USB world works is 
that you need to copy (to the best of your ability) what Microsoft does instead 
of what the USB standards actually say.

He Was A Huge Star Before His Plastic Surgery, Guess Who
stylegoop.com
http://thirdpartyoffers.juno.com/TGL3141/5cf5589d8c201589d6531st01vuc___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Application to check DOS API compatibility

2019-06-02 Thread Mercury Thirteen via Freedos-devel
Darn. I was hoping that, in light of the early MS-DOS clone market, there was 
something maybe released by a third party to help users determine if their DOS 
was MS-DOSsy enough. A reach, I know, but... oh, well. If I end up making one, 
I'll certainly share! :)

Night is coming along well so far, and I'm trying my best to minimize slipping 
the development schedule. Hopefully we'll be on track next year to start 
test-running the first small .COM executables before later moving on to EXE and 
even ELF binaries.

Sent with [ProtonMail](https://protonmail.com) Secure Email.

‐‐‐ Original Message ‐‐‐
On Saturday, June 1, 2019 3:18 PM, Jim Hall  wrote:

> Not that I'm aware of. Such a thing has never really been needed, since 
> MS-DOS was always the gold standard, and Microsoft set the goalposts for most 
> of DOS history. A "compatibility check" tool would have had to come out of 
> Microsoft, but I can't see they would have been motivated to create a product 
> to help others create competing DOS implementations.
>
> Would be neat, though. If you write a tool to do this, please share it. You 
> can use the RBIL as the basis for DOS interrupts.
>
> I assume the NightDOS kernel is doing well, then? 
> https://groups.google.com/forum/#!topic/night-dos-kernel/PaPrNIvVWyo
>
> On Sat, Jun 1, 2019 at 2:08 PM Mercury Thirteen via Freedos-devel 
>  wrote:
>
>> Hello all,
>>
>> Ultimately, I'm looking for an application which can probe the DOS function 
>> calls on a given system and report how "compatible" the current system is, 
>> perhaps presenting a list of what DOS functions have successfully returned 
>> legitimate output. E.g. "Your DOS implementation supports interrupt 
>> functions X and Y but not Z."
>>
>> I understand that in reality there may be no application which does exactly 
>> this... but perhaps in all of the collective knowledge here someone knows of 
>> a program to do something close? Thanks in advance!
>>
>> Sent with [ProtonMail](https://protonmail.com) Secure Email.
>>
>> ___
>> Freedos-devel mailing list
>> Freedos-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/freedos-devel___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Application to check DOS API compatibility

2019-06-01 Thread Jim Hall
Not that I'm aware of. Such a thing has never really been needed, since
MS-DOS was always the gold standard, and Microsoft set the goalposts for
most of DOS history. A "compatibility check" tool would have had to come
out of Microsoft, but I can't see they would have been motivated to create
a product to help others create competing DOS implementations.

Would be neat, though. If you write a tool to do this, please share it. You
can use the RBIL as the basis for DOS interrupts.

I assume the NightDOS kernel is doing well, then?
https://groups.google.com/forum/#!topic/night-dos-kernel/PaPrNIvVWyo



On Sat, Jun 1, 2019 at 2:08 PM Mercury Thirteen via Freedos-devel <
freedos-devel@lists.sourceforge.net> wrote:

> Hello all,
>
> Ultimately, I'm looking for an application which can probe the DOS
> function calls on a given system and report how "compatible" the current
> system is, perhaps presenting a list of what DOS functions have
> successfully returned legitimate output. E.g. "Your DOS implementation
> supports interrupt functions X and Y but not Z."
>
> I understand that in reality there may be no application which does
> exactly this... but perhaps in all of the collective knowledge here someone
> knows of a program to do something close? Thanks in advance!
>
>
> Sent with ProtonMail  Secure Email.
>
> ___
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel
>
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel