•  Back 
  •  Eingabefunktionen 
  •  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-File7.7.32  Bindings für vsm_string                                    TOS

 C:         int16_t vsm_string ( int16_t handle, int16_t max_length, 
            int16_t echo_mode, int16_t *echo_xy, int8_t *string );

 Umsetzung:

            int16_t vsm_string (int16_t handle, int16_t max_length,
                                int16_t echo_mode, int16_t *echo_xy,
                                int8_t *string)
            {
               int16_t tmp;
 
               intin[0] = max_length;
               intin[1] = echo_mode;
               ptsin[0..1] = echo_xy[0..1];
 
               contrl[0] = 31;
               contrl[1] = 1;
               contrl[3] = 2;
               contrl[6] = handle;
 
               vdi ();
 
               for (tmp = 0; tmp < contrl[4]; tmp++)
                  *string++ = intout[tmp];
 
               *string = 0;
               return ( contrl[4] );
            }

 GEM-Arrays:

             Adresse    Feldelement     Belegung 
             contrl     contrl[0]       31         # Opcode der Funktion 
             contrl+2   contrl[1]       1          # Einträge in ptsin 
             contrl+4   contrl[2]       0          # Einträge in ptsout 
             contrl+6   contrl[3]       2          # Einträge in intin 
             contrl+8   contrl[4]       max_length # Einträge in intout 
             contrl+12  contrl[6]       handle 
             intin      intin[0]        max_length 
             intin+2    intin[1]        echo_mode 
             ptsin      ptsin[0..1]     echo_xy[0..1] 
             intout     intout[0..n-1]  string[0..n-1]