|
Atari coding BBS
Re: vbcc shell and acc |
Posted by: mikro
|
May,25.2010-00:11
|
I vaguely remember there was an English version of Chatwin but don't ask me for details :) Did you try mupfel? It was quite popular back in 90s and then there's TomShell what NoCrew guys used for MP2 compilation (calling various TTPs etc) -- it can be found for example here: http://files.dhs.nu/files_coding/mp2_inc.zip
About the ACC, I'm going to be very smart and copy&paste info from Atari Compendium ;-)
Unlike applications, desk accessories are not given all of available
system memory on startup. They are only allocated enough memory for their
text, data, and bss segments. No stack space is allocated for a desk
accessory either. Many high level language stubs reserve space in the BSS
or overwrite startup code to provide a stack but keep in mind that desk
accessory stacks are usually small compared to applications.
As with applications, GEM desk accessories should begin with an
appl_init() function call. Upon success, the ID should be stored and used
within a menu_register() call to place the applications' name on the menu
bar.
Desk accessories, unlike applications, do not begin user interaction
immediately. Most desk accessories initialize themselves and enter
a message loop waiting for an AC_OPEN message. Some desk accessories wait
for timer events or custom messages from another application. After being
triggered, they usually open a window in which user interaction may be
performed (dialogs and alerts may also be presented but are not
recommended because they prevent shuffling between other system
processes).
Desk accessories should not use a menu bar and should never exit (unless
appl_init() fails) after calling menu_register(). If an error condition
occurs which would make the accessory unusable, simply enter an indefinite
message loop.
Any resources loaded by an accessory should be loaded prior to entering
the first event loop and should never be freed after the accessory has
called menu_register(). Resource data for desk accessories should be
embedded in the executable rather than being soft-loaded because memory
allocated to a desk accessory is not freed during a resolution change on
TOS versions less than 2.06. This causes resource memory allocated by
rsrc_load() to be lost to the system after a resolution change and will
likely cause memory fragmentation.
An AC_CLOSE message is sent to an accessory when it is being closed at
the request of the OS. At this point, it should perform any cleanup
necessary to release system resources and close files opened at AC_OPEN
(accessory windows will be closed automatically by the AES). After
cleanup, the event loop should be reentered to wait for subsequent
AC_OPEN messages.
The following code represents a basic skeleton for an AES desk accessory.
#include <AES.H>
#include <VDI.H>
#include <OSBIND.H>
#include <VDIWORK.H>
int main(int, char *[]);
short ap_id;
VDI_Workstation ws; /* See entry for V_Opnvwk() in VDI docs */
char menu_title[] = " Skeleton";
int
main(int argc, char *argv[])
{
char *altNoVDIWork = "[3][GEM is unable to|allocate a workstation.|The program must abort.][ OK ]";
short ret,msg[8],kc,dum;
ap_id = appl_init();
if(ap_id == -1)
return -1;
if(!OpenVwork(&ws))
{
form_alert(1, altNoVDIWork);
appl_exit();
return -1;
}
menu_id = menu_register(ap_id, menu_title ); /* Place name on menu bar */
for(;;)
{
evnt_mesag(msg);
switch( msg[0] )
{
case AC_OPEN:
if(msg[3] == menu_id)
OpenAccessoryWindow();
break;
case AC_CLOSE:
if(msg[3] == menu_id)
{
v_clsvwk(ws.handle);
break;
}
}
}
}
|
[All messages in this thread] [Start new thread]
Topic
|
Posted by
|
Date
|
vbcc shell and acc
|
Orion_
|
May,24.2010-20:16
|
Re: vbcc shell and acc
|
mikro
|
May,25.2010-00:11
|
Re: vbcc shell and acc
|
Orion_
|
May,25.2010-14:06
|
Re: vbcc shell and acc
|
ggn
|
May,25.2010-18:28
|
Re: vbcc shell and acc
|
lp060
|
May,28.2010-08:36
|
Re: vbcc shell and acc
|
Orion_
|
May,31.2010-21:52
|
Re: vbcc shell and acc
|
Orion_
|
Jun,01.2010-10:22
|
Re: vbcc shell and acc
|
Orion_
|
Jun,05.2010-21:30
|
Re: vbcc shell and acc
|
lp060
|
Jun,09.2010-00:38
|
Re: vbcc shell and acc
|
ggn
|
Jun,09.2010-09:29
|
What's the anti-troll code? That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
|