How do I find out the TOS language version installed?

C and PASCAL (or any other high-level languages) in here please

Moderators: exxos, simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
wyerd
Atari maniac
Atari maniac
Posts: 87
Joined: Fri May 31, 2013 7:31 pm
Location: Upstate NY. USA.

How do I find out the TOS language version installed?

Postby wyerd » Tue Oct 03, 2017 1:24 pm

Is there a way to interrogate what language TOS is in C? For example, if it’s US English, the date will be displayed as MM/DD/YY, if any european language it’ll be displayed DD/MM/YY.

czietz
Hardware Guru
Hardware Guru
Posts: 480
Joined: Tue May 24, 2016 6:47 pm

Re: How do I find out the TOS language version installed?

Postby czietz » Tue Oct 03, 2017 1:30 pm

If available, use the _IDT cookie to determine the user's/OS's preference how to display a date: http://toshyp.atari.org/en/003007.html#Cookie_2C_20_IDT
Otherwise, the sysbase variable points to an OSHEADER structure, whose os_conf member will tell you the TOS language.

User avatar
wyerd
Atari maniac
Atari maniac
Posts: 87
Joined: Fri May 31, 2013 7:31 pm
Location: Upstate NY. USA.

Re: How do I find out the TOS language version installed?

Postby wyerd » Tue Oct 03, 2017 1:38 pm

Great, thanks. I’ll look into these.

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: How do I find out the TOS language version installed?

Postby AtariZoll » Tue Oct 03, 2017 2:44 pm

There is cookie less way - in TOS header there is region/language flag. Word at offset $1C . 7 is UK English, 3 is German .... You can find more details after little search.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

czietz
Hardware Guru
Hardware Guru
Posts: 480
Joined: Tue May 24, 2016 6:47 pm

Re: How do I find out the TOS language version installed?

Postby czietz » Tue Oct 03, 2017 3:23 pm

AtariZoll wrote:There is cookie less way - in TOS header there is region/language flag. Word at offset $1C . 7 is UK English, 3 is German .... You can find more details after little search.


Yes, as I already wrote above: "Otherwise, the sysbase variable points to an OSHEADER structure, whose os_conf member will tell you the TOS language." However, the cookie -- if present -- should take preference when displaying a date/time to the user.

User avatar
wyerd
Atari maniac
Atari maniac
Posts: 87
Joined: Fri May 31, 2013 7:31 pm
Location: Upstate NY. USA.

Re: How do I find out the TOS language version installed?

Postby wyerd » Tue Oct 03, 2017 3:27 pm

Thanks for the info. I found a PDF for the Atari Compendium- it’s one helluva reference guide!


Social Media

     

Return to “C / PASCAL etc.”

Who is online

Users browsing this forum: No registered users and 2 guests