VOGONS


First post, by JekhoOne

User metadata
Rank Newbie
Rank
Newbie

A Dos application for which i don't have the source, retrieves date and time info from Dos SO. Even if date/time format of Win7 where DosBox is running has following format :
dd/mm/yyyy ;
HH;MM:SS
the application retrieve a date/time as
mm/dd/yyyy ;
HH:MM pm/am.
How i can modify date/format provided to the application in DosBox 0.74 source code ?

Thanks in advance for your support.
J

Last edited by JekhoOne on 2015-09-21, 09:54. Edited 1 time in total.

Reply 1 of 5, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

If you're determined to tinker with the source then I suggest looking at the details of function 0x38 in dos.cpp and the associated country info table in dos_tables.cpp, but I think you will find it less trouble overall to boot real DOS and use its country system.

Reply 2 of 5, by JekhoOne

User metadata
Rank Newbie
Rank
Newbie

I would like to change the source. Booting real DOS will put in trouble the "operators" that will need to move application files from the image.
Looking to function highlighted by ripsaw8080 and related country info table, my only trouble is to know numerical value of specific fields in country info structure :

/* Date format */ 0x00, 0x00,
/* Currencystring */ 0x24, 0x00, 0x00, 0x00, 0x00,
/* Thousands sep */ 0x2c, 0x00,
/* Decimal sep */ 0x2e, 0x00,
/* Date sep */ 0x2d, 0x00,
/* time sep */ 0x3a, 0x00,
/* currency form */ 0x00,
/* digits after dec */ 0x02,
/* Time format */ 0x00,
/* Casemap */ 0x00, 0x00, 0x00, 0x00,
/* Data sep */ 0x2c, 0x00,
/* Reservered 5 */ 0x00, 0x00, 0x00, 0x00, 0x00,
/* Reservered 5 */ 0x00, 0x00, 0x00, 0x00, 0x00

Can someone help me ?

J

Reply 3 of 5, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

check this and the tables linked
http://www.delorie.com/djgpp/doc/rbinter/id/84/27.html

Water flows down the stream
How to ask questions the smart way!

Reply 4 of 5, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

although if your applications reads the output from DIR you might need to change src/shell/shell_cmds.cpp

Water flows down the stream
How to ask questions the smart way!

Reply 5 of 5, by JekhoOne

User metadata
Rank Newbie
Rank
Newbie

Wonderful !!
Changing :

/* Date format */ 0x00, 0x00 -> /* Date format */ 0x01, 0x00, (European format)

and

/* Time format */ 0x00, -> /* Time format */ 0x01

all works well.

Thanks a lot. Now i am really so happy.

J