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

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 
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 <nasm -h> 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 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 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,!
Freedos-devel mailing list

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
Freedos-devel mailing list

Reply via email to