Home AESAES Extended graphics libraryExtended graphics library Font selectionFont selection

8.24 Extended shell library

This library contains special functions, which are only available on FreeGEM.

xshl_getshell Gets the name of the desktop
xshl_setshell Sets the name of the desktop

See also: About the AES

8.24.1 xshl_getshell

Name: »Shell get« - Get the name of the desktop program to use.
 
Opcode: 1030
 
Syntax: int16_t xshl_getshell ( int8_t *shell );
 
Description: The call xshl_getshell serves to get the name of the desktop program. shell specifies the buffer to receive the shell filename.
 
Return value: This function returns 0 if standard shell (DESKTOP.APP) in use; 1 if it was overridden by use of GEM.CFG or xshl_setshell.
 
Availability: This call is a compile-time option in recent FreeGEM versions. To check for this feature, use appl_init(xbuf) and check that bit 4 of xbuf.abilities is set (ABLE_XSHL).
 
Group: Extended shell library
 
See also: Binding   xshl_setshell
 

8.24.1.1 Bindings for xshl_getshell

C: int16_t xshl_getshell ( int8_t *shell );
 
Binding:
 
int16_t xshl_getshell (int8_t *shell )
{
   addr_in[0] = shell;

   return ( crys_if(1030) );
}
GEM-Arrays:
 

Address Element Contents
control control[0] 1030 # Function opcode
control+2 control[1] 0 # Entry in int_in
control+4 control[2] 1 # Entry in int_out
control+6 control[3] 1 # Entry in addr_in
control+8 control[4] 0 # Entry in addr_out
addr_in addr_in[0] shell
int_out int_out[0] Return value

8.24.2 xshl_setshell

Name: »Shell set« - Set the name of the desktop program to use.
 
Opcode: 1031
 
Syntax: int16_t xshl_setshell ( int8_t *shell );
 
Description: The call xshl_setshell serves to set the name of the desktop program. shell specifies the name of the shell (no path, it must always be in \GEMAPPS\GEMSYS).
 
Note: A normal GEM program is not suitable for use as a shell, since when it terminates it will be immediately re-run.
 
Return value: This function returns 0 if the desktop program was set, or 1 if the name was too long (more than 15 characters).
 
Availability: This call is a compile-time option in recent FreeGEM versions. To check for this feature, use appl_init(xbuf) and check that bit 4 of xbuf.abilities is set (ABLE_XSHL).
 
Group: Extended shell library
 
See also: Binding   xshl_getshell
 

8.24.2.1 Bindings for xshl_setshell

C: int16_t xshl_setshell ( int8_t *shell );
 
Binding:
 
int16_t xshl_setshell (int8_t *shell )
{
   addr_in[0] = shell;

   return ( crys_if(1031) );
}
GEM-Arrays:
 

Address Element Contents
control control[0] 1031 # Function opcode
control+2 control[1] 0 # Entry in int_in
control+4 control[2] 1 # Entry in int_out
control+6 control[3] 1 # Entry in addr_in
control+8 control[4] 0 # Entry in addr_out
addr_in addr_in[0] shell
int_out int_out[0] Return value

Home AESAES Extended graphics libraryExtended graphics library Font selectionFont selection