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

2017-02-20 Thread Denis St-Lau
Good news!

My old program can run now on vDOS and DOSBOX. (In addition to pure FreeDOS 
indeed)

Jos Schaars from the vDOS project gave me an interesting trick: edit manualy 
the temporary dumpfile generated by the program, and making it read-only. I 
discovered being wrong about the relevance of the date style (2-10-98 intead of 
02-10-98 was in fact not detrimental). Instead it was about the position of the 
filename extension. The extension of filenames was moved left by the vDOS's (or 
4DOS's) DIR command when the filename are less than 8 characters long, and the 
program expect them to be written at fixed column positions (cols number 
10-11-12). Knowing this we just have to set alias dir=*dir /j in the 
autoexec.txt of vDOS and the problem is solved. The full discussion can be 
found here:

   


DOSBOX has a different fatal issue : a comma ',' as thousand separator for 
files size.

It may looks a little bit heavy-metal but quite fine for my actual needs to 
modify and recompile the FreeCom's COMMAND.COM. There is just one line to 
modify in the convert() function of the NUM_FMT.C files:

    Just replace the line:
    temp[30 - c++] = nlsBuf->thousendsSep[0];
    By:
    temp[30 - c++] = ' ';

    The following may probably also works because vDOS works with no separator:
    temp[30 - c++] = '';

    And then recompile (ex: build -r xms-swap)

    In a previous post I wrote this changed nothing to the behavior. I was 
wrong... this is because I forgot having a duplicate COMMAND.COM file on the 
system (there is C:\FDOS\BIN\COMMAND.COM in addition to C:\COMMAND.COM, and I 
was not replacing the good one)

After solving the comma issue, I discovered:
  * AM/PM flags not being really detrimental. Sorry for the mislead.
  * The 4 digits year cause a fault requiring a keypress but not a fatal crash 
(better behavior with SET DIRCMD=/-4)


The localcfg program pointed out by Matheuz is nice but it creates a file.sys 
which still need a config.sys country directive in order to be loaded. So I 
think it does not solves the thousendSep or other country issues potentially 
encountered by FreeCOM in the DOSBOX.

I imagine the proof of concept from Eric (CANADA.ASM) has the potential to load 
country settings without config.sys. I let you guys decide I you want to go 
forward that way. I can be no more than a user or a tester because I do not 
have the required developper knowledge.

I did not try EtherDFS but it's good to know it's existence.

Regards, Denis




Le lundi 20 février 2017 2h02, Mateusz Viste  a 
écrit :
 

 Instead of filling out a binary country.sys by hand, you might want to 
use localcfg.exe - much more reliable. It will produce a country.sys file 
with all the parameters you wish.

http://localcfg.sourceforge.net

Of course, all this is pointless if your program won't listen to country 
preferences anyway.

Mateusz




On Sun, 19 Feb 2017 22:57:47 +, Denis St-Lau wrote:
> Hi everyone,
> vDOS is very nice. Unfortunately also blocked with Dir-command related
> issues with my program (file dates in style 2-10-98 intead of 02-10-98).
> I posted a topic on their site. I also found they not support
> modification of the global Country setting (locked to 1).
> 
> About VMWARE and VMSMOUNT. I think it's nearly equivalent to what we
> have at work with Microsoft VirtualPC. I didn't try sendkeys automation
> through this heavier layer but I will give it a try if I cannot use vDOS
> and DOSBOX.
> 
> Eric, I found you are author of MODE.COM !! To set the codepage I added
> this in my autoexec.bat:
>        DISPLAY CON=(ega,863,)
>    MODE CON CODEPAGE PREPARE=((863) %dosdir%\cpi\ega9.cpx)
> 
> I don't know how far I can follow you in the TSR trail to get country
> informations but I'm interested to learn at least up to the next
> obstacle :-) I filled the table you showed to me, if it's not taking too
> much of your time:
> 
>> Offset  Size    Description (Table 01399)
>>  00h    WORD    date format [2 Y-M-D]
>>  02h  5 BYTEs   ASCIZ currency symbol string ['$'.. so I imagine it is
>>  24h, 00h ?] 07h  2 BYTEs   ASCIZ thousands separator [you want this
>>  to be 20h, 00h...Yes]
>>  09h  2 BYTEs   ASCIZ decimal separator ['.' = 2E, 00h ?]
>>  0Bh  2 BYTEs   ASCIZ date separator ['-' = 2D, 00h ?]
>>  0Dh  2 BYTEs   ASCIZ time separator [':' = 3A, 00h ?]
>>  0Fh    BYTE    currency format [not relevant for you? probably not,
>>  answers bellow]
>> bit 2 = set if currency symbol replaces
>> decimal point
>   [I would say No, do
>   not replaces decimal
>   point]
>> bit 1 = number of spaces between value
>> and currency symbol
>   [I would guess 1
>   space]
>> bit 0 = 0 if currency 

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

2017-02-19 Thread Mateusz Viste
Instead of filling out a binary country.sys by hand, you might want to 
use localcfg.exe - much more reliable. It will produce a country.sys file 
with all the parameters you wish.

http://localcfg.sourceforge.net

Of course, all this is pointless if your program won't listen to country 
preferences anyway.

Mateusz




On Sun, 19 Feb 2017 22:57:47 +, Denis St-Lau wrote:
> Hi everyone,
> vDOS is very nice. Unfortunately also blocked with Dir-command related
> issues with my program (file dates in style 2-10-98 intead of 02-10-98).
> I posted a topic on their site. I also found they not support
> modification of the global Country setting (locked to 1).
> 
> About VMWARE and VMSMOUNT. I think it's nearly equivalent to what we
> have at work with Microsoft VirtualPC. I didn't try sendkeys automation
> through this heavier layer but I will give it a try if I cannot use vDOS
> and DOSBOX.
> 
> Eric, I found you are author of MODE.COM !! To set the codepage I added
> this in my autoexec.bat:
>        DISPLAY CON=(ega,863,)
>    MODE CON CODEPAGE PREPARE=((863) %dosdir%\cpi\ega9.cpx)
> 
> I don't know how far I can follow you in the TSR trail to get country
> informations but I'm interested to learn at least up to the next
> obstacle :-) I filled the table you showed to me, if it's not taking too
> much of your time:
> 
>> Offset  Size    Description (Table 01399)
>>  00h    WORD    date format [2 Y-M-D]
>>  02h  5 BYTEs   ASCIZ currency symbol string ['$'.. so I imagine it is
>>  24h, 00h ?] 07h  2 BYTEs   ASCIZ thousands separator [you want this
>>  to be 20h, 00h...Yes]
>>  09h  2 BYTEs   ASCIZ decimal separator ['.' = 2E, 00h ?]
>>  0Bh  2 BYTEs   ASCIZ date separator ['-' = 2D, 00h ?]
>>  0Dh  2 BYTEs   ASCIZ time separator [':' = 3A, 00h ?]
>>  0Fh    BYTE    currency format [not relevant for you? probably not,
>>  answers bellow]
>> bit 2 = set if currency symbol replaces
>> decimal point
>   [I would say No, do
>   not replaces decimal
>   point]
>> bit 1 = number of spaces between value
>> and currency symbol
>   [I would guess 1
>   space]
>> bit 0 = 0 if currency symbol precedes
>> value
>> 1 if currency symbol
>> follows value
>   [Not sure but I would
>   guess bit 0 =1]
>>  10h    BYTE    number of digits after decimal in currency
>   [not relevant? maybe not but I would
>   say 2 digits]
>>  11h    BYTE    time format [you say you want 24h time, so make this
>>  1--Yes]
>> bit 0 = 0 if 12-hour clock
>> 1 if 24-hour clock
>>  12h    DWORD   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...]
> 
> 
> To answer your question about our old MS-DOS program: We have used it in
> MS-DOS and winXP-win32 console only. It is described at
> . There is not so many users since it is
> addressed to a very specialized domain. Only the newer Windows version
> is supported by the maker.
> 
> Thanks, Denis
>  
>  
> Le Dimanche 19 février 2017 8h39, Ulrich Hansen
>  a écrit :
>  
>  
> 
>  
> Am 18.02.2017 um 23:22 schrieb Denis St-Lau :
> 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.
> 
> Yes, you are completely right about that.
> But please take a look at a new project: „EtherDFS“ by Mateusz
> Viste.http://etherdfs.sourceforge.net If your host is running GNU/Linux,
> you can start EtherSRV on the host and EtherDFS on your DOS guest.
> On the host go to the directory, that EtherSRV is mounting. Share it
> with Samba to your Windows clients.
> That’s it. You have now what everybody wants: A network disk in FreeDOS,
> shared with everybody in your LAN, and still 618 K conventional memory
> free.
> The only downsides, as I see it:- At the moment EtherSRV will change
> timestamps of received files to the actual date and time.- On VirtualBox
> a guest with EtherDFS can not reach (yet) an EtherSRV running on a
> machine outside the host.- EtherSRV is running on GNU/Linux only.


--
Check out the vibrant tech community on one of the world's most
engaging tech 

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

2017-02-19 Thread Denis St-Lau
Thanks a lot Eric for this program.
I have the space delimiter for thousands with the FreeDOS kernel on my 
VirtualBox. (But not in the DOSBOX with it's own kernel of course). And 
yesterday when I replaced the thousand delimiter in convert() of NUM_FMT.C 
with:    temp[30 - c++] = ' ';instead of:
    temp[30 - c++] = nlsBuf->thousendsSep[0];
This had no visible effect on the behavior of my new Command.com


I have a mysterious problem to compile as you say:    when I do:  NASM -O 
CANADA.COM CANADA.ASM    I get: "nasm: fatal: unknown optimization option 
-OC"
And if I rename to test.asm I get:    "nasm: fatal: unknown optimization 
option -Ot"
Looks like it doesn't see the space character between the -O switch and the 
file name. Even if I put multiple spaces between them. Have you ever see 
this?(Can't read the help with  because I don't know how to scroll one 
page at a time.)

Regards, Denis
 

Le Dimanche 19 février 2017 19h41, Eric Auer  a écrit :
 

 Hi everybody, see yet another FreeCOM feature request below... ;-)

Thanks for filling in the table, Denis! A proof of concept tool for
your task, for compilation with "NASM -O CANADA.COM CANADA.ASM" is
implemented in the following code:

> start:    jmp short setup    ; 100h
> chain:
>     db 0eah        ; jmp far fixed offset
>     dw 0,0        ; 103h: old INT 21 vector stored here
> mapc:    retf        ; 107h: dummy case mapping routine
> new21:    pushf        ; 108h: new INT 21 handler
>     cmp ax,3800h    ; get country info?
>     jz canada
>     popf
>     jmp short chain
> 
> canada:    popf        ; DS:DX is pointer to user buffer
>     mov bx,dx
>     mov word [bx+0],2    ; date format Year Month Day
>     mov word [bx+2],24h    ; dollar sign, null char (currency)
>     mov word [bx+7],20h    ; space char, null char (1000s sep)
>     mov word [bx+9],2eh    ; ".", null char (decimal separator)
>     mov word [bx+11],2dh    ; "-", null char (date separator)
>     mov word [bx+13],3ah    ; colon, null char (time separator)
>     mov byte [bx+15],3    ; currency format flags
>     mov byte [bx+16],2    ; decimals for amounts of money
>     mov byte [bx+17],1    ; use 24 hour time
>     mov word [bx+18],107h    ; case map routine (dummy)
>     mov [bx+20],cs        ; case map routine segment
>     mov word [bx+22],20h    ; space char, null, data list sep
>     ; at offset 24: ten bytes of reserved data, ignored here
>     mov bx,2    ; country code for French Canadian
>     clc
>     retf +2
> 
> setup:            ; offset must be at most 160h (16+6 para)
>     mov ax,3521h    ; get INT 21 vector
>     int 21h        ; return ES:BX
>     mov [103h],bx    ; offset
>     mov [105h],es    ; segment
>     mov ax,2521h    ; set new INT 21 vector
>     mov dx,108h    ; new21 offset, expect DS=CS
>     int 21h
>     mov ax,3100h    ; stay TSR, errorlevel 0
>     mov dx,16+6    ; resident paragraphs incl. PSP
>     int 21h

However, it turns out that the long number display code of
freecom command.com does NOT support country settings AT ALL
YET! It just uses comma as thousands separator all the time.

See the "convert" function in the "num_fmt" source code file.

I am not sure about the date format: Freecom sources say it
should work, but I think it does not change for me? Do not
forget to load a new instance of freecom (by running the
command.com binary, simple) after running the CANADA tool.

At least the tool does switch to 24 hour time correctly :-p

The clock display in EDIT also follows the CANADA settings.

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


   --
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-19 Thread Eric Auer
Hi everybody, see yet another FreeCOM feature request below... ;-)

Thanks for filling in the table, Denis! A proof of concept tool for
your task, for compilation with "NASM -O CANADA.COM CANADA.ASM" is
implemented in the following code:

> start:jmp short setup ; 100h
> chain:
>   db 0eah ; jmp far fixed offset
>   dw 0,0  ; 103h: old INT 21 vector stored here
> mapc: retf; 107h: dummy case mapping routine
> new21:pushf   ; 108h: new INT 21 handler
>   cmp ax,3800h; get country info?
>   jz canada
>   popf
>   jmp short chain
> 
> canada:   popf; DS:DX is pointer to user buffer
>   mov bx,dx
>   mov word [bx+0],2   ; date format Year Month Day
>   mov word [bx+2],24h ; dollar sign, null char (currency)
>   mov word [bx+7],20h ; space char, null char (1000s sep)
>   mov word [bx+9],2eh ; ".", null char (decimal separator)
>   mov word [bx+11],2dh; "-", null char (date separator)
>   mov word [bx+13],3ah; colon, null char (time separator)
>   mov byte [bx+15],3  ; currency format flags
>   mov byte [bx+16],2  ; decimals for amounts of money
>   mov byte [bx+17],1  ; use 24 hour time
>   mov word [bx+18],107h   ; case map routine (dummy)
>   mov [bx+20],cs  ; case map routine segment
>   mov word [bx+22],20h; space char, null, data list sep
>   ; at offset 24: ten bytes of reserved data, ignored here
>   mov bx,2; country code for French Canadian
>   clc
>   retf +2
> 
> setup:; offset must be at most 160h (16+6 para)
>   mov ax,3521h; get INT 21 vector
>   int 21h ; return ES:BX
>   mov [103h],bx   ; offset
>   mov [105h],es   ; segment
>   mov ax,2521h; set new INT 21 vector
>   mov dx,108h ; new21 offset, expect DS=CS
>   int 21h
>   mov ax,3100h; stay TSR, errorlevel 0
>   mov dx,16+6 ; resident paragraphs incl. PSP
>   int 21h

However, it turns out that the long number display code of
freecom command.com does NOT support country settings AT ALL
YET! It just uses comma as thousands separator all the time.

See the "convert" function in the "num_fmt" source code file.

I am not sure about the date format: Freecom sources say it
should work, but I think it does not change for me? Do not
forget to load a new instance of freecom (by running the
command.com binary, simple) after running the CANADA tool.

At least the tool does switch to 24 hour time correctly :-p

The clock display in EDIT also follows the CANADA settings.

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


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

2017-02-19 Thread Denis St-Lau
Hi everyone,
vDOS is very nice. Unfortunately also blocked with Dir-command related issues 
with my program (file dates in style 2-10-98 intead of 02-10-98). I posted a 
topic on their site. I also found they not support modification of the global 
Country setting (locked to 1).

About VMWARE and VMSMOUNT. I think it's nearly equivalent to what we have at 
work with Microsoft VirtualPC. I didn't try sendkeys automation through this 
heavier layer but I will give it a try if I cannot use vDOS and DOSBOX.

Eric, I found you are author of MODE.COM !! To set the codepage I added this in 
my autoexec.bat:
       DISPLAY CON=(ega,863,)
   MODE CON CODEPAGE PREPARE=((863) %dosdir%\cpi\ega9.cpx)

I don't know how far I can follow you in the TSR trail to get country 
informations but I'm interested to learn at least up to the next obstacle :-) I 
filled the table you showed to me, if it's not taking too much of your time:

> Offset  Size    Description (Table 01399)
>  00h    WORD    date format [2 Y-M-D]
>  02h  5 BYTEs   ASCIZ currency symbol string ['$'.. so I imagine it is 24h, 
>00h ?]
>  07h  2 BYTEs   ASCIZ thousands separator [you want this to be 20h, 00h...Yes]
>  09h  2 BYTEs   ASCIZ decimal separator ['.' = 2E, 00h ?]
>  0Bh  2 BYTEs   ASCIZ date separator ['-' = 2D, 00h ?]
>  0Dh  2 BYTEs   ASCIZ time separator [':' = 3A, 00h ?]
>  0Fh    BYTE    currency format [not relevant for you? probably not, answers 
>bellow]
> bit 2 = set if currency symbol replaces decimal point
  [I would say No, do not replaces decimal point]
> bit 1 = number of spaces between value and currency symbol
  [I would guess 1 space]
> bit 0 = 0 if currency symbol precedes value
> 1 if currency symbol follows value
  [Not sure but I would guess bit 0 =1]
>  10h    BYTE    number of digits after decimal in currency 
  [not relevant? maybe not but I would say 2 digits]
>  11h    BYTE    time format [you say you want 24h time, so make this 1--Yes]
> bit 0 = 0 if 12-hour clock
> 1 if 24-hour clock
>  12h    DWORD   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...]


To answer your question about our old MS-DOS program: We have used it in MS-DOS 
and winXP-win32 console only. It is described at 
. There is not so many users since it is 
addressed to a very specialized domain. Only the newer Windows version is 
supported by the maker.

Thanks, Denis
 

Le Dimanche 19 février 2017 8h39, Ulrich Hansen  a 
écrit :
 

 

Am 18.02.2017 um 23:22 schrieb Denis St-Lau :
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.

Yes, you are completely right about that. 
But please take a look at a new project: „EtherDFS“ by Mateusz 
Viste.http://etherdfs.sourceforge.net
If your host is running GNU/Linux, you can start EtherSRV on the host and 
EtherDFS on your DOS guest.
On the host go to the directory, that EtherSRV is mounting. Share it with Samba 
to your Windows clients.
That’s it. You have now what everybody wants: A network disk in FreeDOS, shared 
with everybody in your LAN, and still 618 K conventional memory free.
The only downsides, as I see it:- At the moment EtherSRV will change timestamps 
of received files to the actual date and time.- On VirtualBox a guest with 
EtherDFS can not reach (yet) an EtherSRV running on a machine outside the 
host.- EtherSRV is running on GNU/Linux only.


--
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-19 Thread Ulrich Hansen

> Am 18.02.2017 um 23:22 schrieb Denis St-Lau  >:
> 
> 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.

Yes, you are completely right about that. 

But please take a look at a new project: „EtherDFS“ by Mateusz Viste.
http://etherdfs.sourceforge.net 

If your host is running GNU/Linux, you can start EtherSRV on the host and 
EtherDFS on your DOS guest.

On the host go to the directory, that EtherSRV is mounting. Share it with Samba 
to your Windows clients.

That’s it. You have now what everybody wants: A network disk in FreeDOS, shared 
with everybody in your LAN, and still 618 K conventional memory free.

The only downsides, as I see it:
- At the moment EtherSRV will change timestamps of received files to the actual 
date and time.
- On VirtualBox a guest with EtherDFS can not reach (yet) an EtherSRV running 
on a machine outside the host.
- EtherSRV is running on GNU/Linux only.


--
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-19 Thread Joe Forster/STA

Hi guys,

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 (",")


Honestly, I wouldn't bother with trying to disassemble, decompile, 
recompile, whatever any of the programs involved because I wouldn't have 
the necessary tools and settings to reproduce the same programs, only 
with these small changes and nothing else. I would rather hack the 
binaries.


In this case, your DOS program could be changed in a few places so that 
its fixed but FreeDOS-incompatible requirements become fixed 
FreeDOS-compatible ones. Without having seen your program, I would say 
that changing requirement:

- #3 is easy;
- #1 is a bit complicated;
- #2 may not be possible.
In the last case, I would hack the FreeDOS command.com also/instead.

These changes would break compatibility between your program and other 
DOS'es as well as the compatibility of FreeDOS with other programs so 
they would be only for this very specific setup. You should get a 
replacement for your program as soon as possible, though. :-)


Joe
--
KOVÁCS Balázs aka Joe Forster/STA; s...@c64.rulez.org; http://sta.c64.org
Don't E-mail spam, HTML or uncompressed files! More contacts on homepage--
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-19 Thread Eric Auer

Hi Denis,

country.sys is not a driver, it is a data file. So you can
not load *that* with DEVLOAD. However, you can load other
drivers, if that helps you. Read the manual of our DISPLAY
and MODE: By first loading DISPLAY, then running MODE, you
can switch fonts, in case codepage 437 is not sufficient.

VDOS is simply a variant of DOSBOX for more serious work.

VMSMOUNT is a program to make drives offered by a VMWare
host available to a DOS running inside VMWare.

If you fill in the table of settings in my previous mail, I
can add some detail to the COUNTRY setting TSR method, so
you do not have to tweak the technical mess yourself :-)

Cheers, Eric

PS: What does that 25 year old program do? For which
version and brand of DOS was it originally designed?



--
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

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 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 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


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 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 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