•  Back 
  •  fsel_boxinput 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : TOS - das Betriebssystem
Author      : 
Version     : tos.hyp (5. März 2013)
Subject     : Programmieren/Atari
Nodes       : 3001
Index Size  : 93602
HCP-Version : 5
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Titel
@help       : 
@options    : +g -i -s +x +zz -t4
@width      : 70
View Ref-File8.4.1.1  Bindings für fsel_boxinput                                TOS

 C:

             /* Prototyp des Message-Handlers. */
             typedef void cdecl (* FSEL_CALLBACK)(int16_t *msg);

             int16_t fsel_boxinput ( int16_t *global, int8_t 
             *fs_einpath, int8_t *fs_einsel, int16_t *fs_eexbutton, 
             int8_t *elabel, FSEL_CALLBACK callback );

 Umsetzung:

             int16_t fsel_boxinput ( int16_t *global, int8_t *fs_einpath,
                                     int8_t *fs_einsel, int16_t *fs_eexbutton,
                                     int8_t *elabel, FSEL_CALLBACK callback )
             {
               void *aespb[6], *addrin[6], *addrout[6];
               int contrl[5], intin[16], intout[7];
 
               aespb[0] = contrl;
               aespb[1] = global;
               aespb[2] = intin;
               aespb[3] = intout;
               aespb[4] = addrin;
               aespb[5] = addrout;
 
               contrl[0] = 91;
               contrl[1] = 0;
               contrl[2] = 2;
               contrl[3] = 4;
               contrl[4] = 0;
 
                addr_in[0] = fs_einpath;
                addr_in[1] = fs_einsel;
                addr_in[2] = elabel;
                addr_in[3] = callback;
 
               _crystal((AESPB *)aespb);
 
                *fs_eexbutton = int_out[1];
                return ( int_out[0] );
             }

 GEM-Arrays:

              Adresse     Feldelement  Belegung 
              control     control[0]   91    # Opcode der Funktion 
              control+2   control[1]   0     # Einträge in int_in 
              control+4   control[2]   2     # Einträge in int_out 
              control+6   control[3]   4     # Einträge in addr_in 
              control+8   control[4]   0     # Einträge in addr_out 
              addr_in     addr_in[0]   fs_einpath 
              addr_in+4   addr_in[1]   fs_einsel 
              addr_in+8   addr_in[2]   elabel 
              addr_in+12  addr_in[3]   callback 
              int_out     int_out[0]   Return-Wert 
              int_out+2   int_out[1]   fs_eexbutton 

Achtung BoxKite benötigt Informationen aus dem 'global'-Array der 
Hauptapplikation. Die mitgelieferten GEM-Bindings von 
Entwicklungssystemen übergeben dieses normalerweise automatisch.