Re: [Freedos-devel] Incompatibility issue due to FreeCom Dir command's output layout and Dosbox kernel limitations

2017-02-18 Thread Eric Auer

For some extra details about the COUNTRY settings idea :-)

> if the DOSBOX simulated DOS kernel is missing country functionality
> and you do not want to boot freedos (because you do not want to use
> diskimages) then you could load a TSR which answers COUNTRY requests
> by freecom command.com with country preferences of your choice :-)

You basically need a very simple "int 21h function AH=38h" TSR tool...

Sub-function AL=0: Fills buffer at DS:DX, passed by the user, with a
table, clears carry, sets BX to country code. Table format from RBIL:

> Offset  SizeDescription (Table 01399)
>  00hWORDdate format [0=M-D-Y, 1 D-M-Y, 2 Y-M-D, which is yours?]
>  02h  5 BYTEs   ASCIZ currency symbol string [not relevant for you?]
>  07h  2 BYTEs   ASCIZ thousands separator [you want this to be 20h, 00h]
>  09h  2 BYTEs   ASCIZ decimal separator [not relevant for you?]
>  0Bh  2 BYTEs   ASCIZ date separator [you did not specify your preference]
>  0Dh  2 BYTEs   ASCIZ time separator [you did not specify your preference]
>  0FhBYTEcurrency format [not relevant for you?]
> bit 2 = set if currency symbol replaces decimal point
> bit 1 = number of spaces between value and currency symbol
> bit 0 = 0 if currency symbol precedes value
> 1 if currency symbol follows value
>  10hBYTEnumber of digits after decimal in currency [not relevant?]
>  11hBYTEtime format [you say you want 24h time, so make this 1]
> bit 0 = 0 if 12-hour clock
> 1 if 24-hour clock
>  12hDWORD   address of case map routine [could point to RETF opcode]
> (FAR CALL, AL = character to map to upper case [>= 80h])
>  16h  2 BYTEs   ASCIZ data-list separator [not relevant? who uses this?]
>  18h 10 BYTEs   reserved [so not relevant for you by definition...]

You apparently want country code to be 2 (Canadian French). You can
also load DISPLAY and use MODE to load the codepage 863 font if the
required VGA BIOS functionality is supported in DOSEMU - I think yes.

You can use DEVLOAD to load SYS drivers from the shell prompt, as it
seems from your earlier mail that DOSBOX barely does any config sys?

The additional sub-functions 1 to -1 with DX = -1, probably are not
relevant for you. Those are for on the fly country config changes.

In MS DOS 7 (Win95's DOS) mode, there would also be int 21h function
set 70h with various sub-functions, but I doubt that freecom makes
any attempts to query those.

Regards, Eric



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Incompatibility issue due to FreeCom Dir command's output layout and Dosbox kernel limitations

2017-02-18 Thread Denis St-Lau
Hi Eric,
Thanks for your answer.
I agree it would be far better using a switch to avoid recompiling the FreeCOM 
command.com but after my research I concluded DOSBOX do not offer these country 
settings and is missing any config.sys functionality. I've read they are not 
very interested in adding this because they focus only on the minimum work 
required for games compatibility. They don't even support the dir /-4 switch in 
their own command.com. I will continue to investigate and asking them just in 
case. But I do not expect much help on their side because my program is not a 
game.

Also I want to avoid booting the FreeDOS kernel on a disk image, because doing 
so do not allow access to the host file system. Without the DOSBOX kernel, we 
don't have the "mount" command and we constantly have to mount/unmount the DOS 
disk image from the GNU/Linux or Windows host (or use FTP networking) to 
exchange data. This is tedious and the disk image gets corrupted if 
simultaneously mounted or written on by the Host and the DOS. I need to use the 
DOSBOX kernel because I want direct access to the directories without being 
confined in virtual disk images. 

>From my point of view an interesting improvement for the next FreeDOS's kernel 
>could be to duplicate the DOSBOX capability to mount external directories...

PS: ymail exists since many years. For me it is not a recent renaming.


 

Le samedi 18 février 2017 16h19, Eric Auer  a écrit :
 

 
Hi Denis,

you write that for getting 2 digit, AM/PM, space 1000s sep
DIR output from freecom, you use SET DIRCMD=/-4 but failed
to find a way to set COUNTRY to 002,863,c:\fdos\bin\country.sys
in the context of DOSBOX. I still think it would be a lot
easier to find out how to change DOSBOX country settings
compared to compiling a special freecom command.com which
has your desired settings hardcoded.

Any DOSBOX fans who could make a recommendation here? :-)

Regards, Eric

PS: As far as I remember, you can also tell DOSBOX to boot
a freedos kernel with freedos config.sys from a disk image,
so if the simulated DOS kernel of DOSBOX lacks country.sys
support at all, then booting freedos would be a workaround.

PPS: Did yahoo mail get renamed to ymail?


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


   --
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Incompatibility issue due to FreeCom Dir command's output layout and Dosbox kernel limitations

2017-02-18 Thread Steve Nickolas
On Sun, 19 Feb 2017, Eric Auer wrote:

> Bonsoir Denis,
>
> if the DOSBOX simulated DOS kernel is missing country functionality
> and you do not want to boot freedos (because you do not want to use
> diskimages) then you could load a TSR which answers COUNTRY requests
> by freecom command.com with country preferences of your choice :-)
>
> Dosbox also had some spin-off for people who want to run "work"
> software instead of "play" software: Less sound and graphics and
> more other features, as far as I remember...

I think it's called VDOS and it uses 4DOS as its default shell.

-uso.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Incompatibility issue due to FreeCom Dir command's output layout and Dosbox kernel limitations

2017-02-18 Thread Steve Nickolas

On Sat, 18 Feb 2017, Denis St-Lau wrote:


Hi all,

There is an incompatibility issue with the "File Selection" dialogs of one of our legacy 
engineering MS-DOS programs. We don't have the source code of the program but I know it was written in 
Borland Turbo-Basic a long time ago. For years I thought it was a flaw in the FreeDOS compatibility. In fact 
I found recently this is because the output of the "dir" command is dumped in a temporary text file 
and parsed by the program in a fragile way. I discovered three requirements for this program to work. The 
display of the "dir" command must be formatted in a way that :

1 - The file dates must be printed with a 2 digits year representation
2 - The file times must be printed without the AM/PM flag (24 hours 
representation)
3 - The thousands delimiter of the file sizes must be a blank space (" ") instead of a 
comma (",")

The first requirement is easy to handle in autoexec.bat with: SET DIRCMD=/-4.  
The second and third requirements need an appropriate fdconfig.sys setting, for 
example:  !Country = 002, 863, C:\FDOS\BIN\Country.sys

But when installing FreeDOS 1.2 in DosBox, we can't configure the fdconfig.sys. 
I want to use the program this way in order to operate it automatically with a 
Python script on the Host machine while sharing files and directories. So now 
I'm trying to patch and recompile the FreeCom's COMMAND.COM program to meet the 
above requirements.

I am not proficient in C but all seems to happen in the DisplaySingleDirEntry() function of the 
DIR.C file. At least I can remove the AM/PM flag with an ugly "p[strlen(p)-1] = 0;" just 
before the "fputs(p, stdout);" at line of code n°884.

The compilation works well but now I struggle to modify the thousand delimiter. I 
thought it could be easy with the convert() function of NUM_FMT.C (see temp[30 - 
c++] = nlsBuf->thousendsSep[0];) but it have no effects and I don't see how to 
change the country settings.

Does someone have an idea how this could be done?

By the way, I really like the FDIMPLES provided with the new FreeDOS 1.2 !

Regards,






The logical way in which removing commas from DIR ought to be handled, in 
my opinion, is to use the NO_SEP variable, à la PC DOS 6.3 and 7.  That 
said, your program is probably liable to break on MS-DOS 6.2x as well as 
it does on FreeDOS, as 6.2 introduced the comma separators.


I don't know if FreeCOM has a comparable feature.

-uso.--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Incompatibility issue due to FreeCom Dir command's output layout and Dosbox kernel limitations

2017-02-18 Thread Eric Auer

Bonsoir Denis,

if the DOSBOX simulated DOS kernel is missing country functionality
and you do not want to boot freedos (because you do not want to use
diskimages) then you could load a TSR which answers COUNTRY requests
by freecom command.com with country preferences of your choice :-)

Dosbox also had some spin-off for people who want to run "work"
software instead of "play" software: Less sound and graphics and
more other features, as far as I remember...

Regarding the mount host filesystem feature of dosbox virtual DOS:
When you use freedos kernel in DOSEMU, you can configure it to use
host (Linux) directories as virtual drives. There are also generic
drivers such as VMSMOUNT which allow a DOS, in particular freedos,
to mount drives offered by the host in vmware :-) I do not know if
DOSBOX offers a general drive access for which a driver can be made
for a real DOS. Maybe the DOSBOX drives only exist for the virtual
DOS simulated by DOSBOX itself. Giving VMWARE and VMSMOUNT a try is
probably worth the experiment :-)

By the way, why does your software use command.com DIR and parses
the output? It would probably be a lot easier to use the DIR call
in the DOS kernel, which is machine readable instead of pure text.

Cheers, Eric



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


[Freedos-devel] Incompatibility issue due to FreeCom Dir command's output layout and Dosbox kernel limitations

2017-02-18 Thread Denis St-Lau
Hi all,

There is an incompatibility issue with the "File Selection" dialogs of one of 
our legacy engineering MS-DOS programs. We don't have the source code of the 
program but I know it was written in Borland Turbo-Basic a long time ago. For 
years I thought it was a flaw in the FreeDOS compatibility. In fact I found 
recently this is because the output of the "dir" command is dumped in a 
temporary text file and parsed by the program in a fragile way. I discovered 
three requirements for this program to work. The display of the "dir" command 
must be formatted in a way that :

1 - The file dates must be printed with a 2 digits year representation
2 - The file times must be printed without the AM/PM flag (24 hours 
representation)
3 - The thousands delimiter of the file sizes must be a blank space (" ") 
instead of a comma (",")

The first requirement is easy to handle in autoexec.bat with: SET DIRCMD=/-4.  
The second and third requirements need an appropriate fdconfig.sys setting, for 
example:  !Country = 002, 863, C:\FDOS\BIN\Country.sys

But when installing FreeDOS 1.2 in DosBox, we can't configure the fdconfig.sys. 
I want to use the program this way in order to operate it automatically with a 
Python script on the Host machine while sharing files and directories. So now 
I'm trying to patch and recompile the FreeCom's COMMAND.COM program to meet the 
above requirements.

I am not proficient in C but all seems to happen in the DisplaySingleDirEntry() 
function of the DIR.C file. At least I can remove the AM/PM flag with an ugly 
"p[strlen(p)-1] = 0;" just before the "fputs(p, stdout);" at line of code n°884.

The compilation works well but now I struggle to modify the thousand delimiter. 
I thought it could be easy with the convert() function of NUM_FMT.C (see 
temp[30 - c++] = nlsBuf->thousendsSep[0];) but it have no effects and I don't 
see how to change the country settings.

Does someone have an idea how this could be done?

By the way, I really like the FDIMPLES provided with the new FreeDOS 1.2 !

Regards,



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Incompatibility issue due to FreeCom Dir command's output layout and Dosbox kernel limitations

2017-02-18 Thread Eric Auer

Hi Denis,

you write that for getting 2 digit, AM/PM, space 1000s sep
DIR output from freecom, you use SET DIRCMD=/-4 but failed
to find a way to set COUNTRY to 002,863,c:\fdos\bin\country.sys
in the context of DOSBOX. I still think it would be a lot
easier to find out how to change DOSBOX country settings
compared to compiling a special freecom command.com which
has your desired settings hardcoded.

Any DOSBOX fans who could make a recommendation here? :-)

Regards, Eric

PS: As far as I remember, you can also tell DOSBOX to boot
a freedos kernel with freedos config.sys from a disk image,
so if the simulated DOS kernel of DOSBOX lacks country.sys
support at all, then booting freedos would be a workaround.

PPS: Did yahoo mail get renamed to ymail?


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel