Specify that app is single-tasking?

GFA, ASM, STOS, ...

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

tschak909
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 138
Joined: Mon Mar 26, 2018 9:29 pm

Specify that app is single-tasking?

Postby tschak909 » Thu Jun 06, 2019 5:58 am

How can I flag in C, to a multitasking AES that an app is single-tasking? I noticed this with Geneva and certain comms programs, for example.

-Thom

joska
Hardware Guru
Hardware Guru
Posts: 4425
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Specify that app is single-tasking?

Postby joska » Thu Jun 06, 2019 7:10 am

I don't think there is a program file header flag for this. You must either specifically select this when starting the program, or save this information in the desktop configuration (like e.g. Thing! does).

https://freemint.github.io/tos.hyp/en/s ... shel_write
Jo Even

VanillaMiNT - Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

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

Re: Specify that app is single-tasking?

Postby czietz » Thu Jun 06, 2019 9:00 am

There is an extension to the program header flags for single-tasking mode that is however only available under FreeMiNT/XaAES:
https://github.com/freemint/freemint/bl ... s.txt#L822

User avatar
Rajah Lone
Captain Atari
Captain Atari
Posts: 454
Joined: Wed Aug 07, 2002 12:27 pm
Location: Lyon / France
Contact:

Re: Specify that app is single-tasking?

Postby Rajah Lone » Thu Jun 06, 2019 8:31 pm

Test in your program at start your ap_id number, given by appl_find("MYAPP "), where "MY_APP " is your program name (with spaces to fill 8 characters).

If ap_id = 0 then your are in singleTOS mode (usualy, the desk has ap_id = 0, but your application replaces the desk in monoTOS).
If ap_id > 0 then your application is in multitask mode, display a GEM alert and quit.


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 1 guest