•  Back 
  •  The MagiC Mac cookie 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : TOS - The Operating System
Author      : 
Version     : tos.hyp (December 19, 2008)
Subject     : Programmieren/Atari
Nodes       : 3010
Index Size  : 93790
HCP-Version : 5
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Title
@help       : 
@options    : +g -i -s +x +zz -t4
@width      : 70
View Ref-File12.1.11.10  macAppSwitch                                           TOS

Here Atari routines can hook themselves in with the XBRA procedure. 
They are then called in Atari-mode (supervisor-mode) when one of the 
specified events occurs. This is required, for instance, when an Atari 
program wants to make use of certain Macintosh routines. For example, 
a program using the sound routines of the Mac can be told in this way 
when MagiC Mac has been terminated to close the sound channels and to 
release the occupied memory.

The following values are passed in d0.W and on the stack (and must 
also remain there):

 Value  Description

 0      Suspend
        MagiC Mac is placed in the background - a different Macintosh 
        application comes to the foreground (e.g. the Finder)
 1      Resume
        MagiC Mac is the foreground application again on the Macintosh 
        side
 2      Quit
        MagiC Mac is terminated
 3      Flag atariModePossible becomes FALSE afterwards
 4      Flag atariModePossible is TRUE again

Note: The routine has to be called in Atari supervisor-mode, the USP 
is undefined.

See also: The MagiC Mac cookie   Cookie and XBRA list