•  Back 
  •  Classic XAcc 
  •  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-File13.13.2.4  Message group 1                                         TOS

ACC_ACK  = 0x500
ACC_TEXT = 0x501
ACC_KEY  = 0x502

  1. Transmitting text data:

          msg[0]:  ACC_TEXT (0x501)
          msg[4]:  and
          msg[5]:  Pointer to text

     The text may contain all printable ASCII characters (code >= 32) 
     and the following control codes:

     0x09 TAB (may be interpreted as a space by the receiver)
     0x0A LF (usually ignored by receiver)
     0x0D CR (used to mark an end-of-line (or end-of paragraph)

     Other control codes may only be used if the receiver is known to 
     understand them. The text is terminated by a zero byte. After the 
     text has been interpreted completely, the receiver acknowledges 
     by sending

          msg[0]:  ACC_ACK (0x500)
          msg[3]:  0 if the text was simply ignored
                   1 if it was used in some sensible way

     The sender of a text message may not change the text nor send any 
     other text messages to the same receiver until is has received 
     the acknowledgement.

     The sender must make sure that the memory used to store the text 
     is globally accessible.

     The receiver should normally interpret the text as if it were 
     typed from the keyboard. A word processor would for example 
     insert it into the currently edited document (this implies using 
     CR as an end-of-paragraph mark), a command line interpreter would 
     interpret the text as a command (which implies using CR as an 
     end-of-line mark).

  2. Simulation of a key press:

          msg[0]:  ACC_KEY (0x502)
          msg[3]:  Scancode of the simulated key and corresponding
                   ASCII-code (as returned by evnt_keybd)
          msg[4]:  State of the [Shift] keys (as returned by Kbshift)

     This message should be regarded identical to a keyboard event. It 
     can be used to send control commands to a receiver which might 
     have been issued from the keyboard. Of course this requires a 
     knowledge of the receiver, as no standard keyboard command sets 
     exist. It should be noted that the receiver is free to use only 
     the ASCII-code or only the scancode, or both of them.

     This message is acknowledged after its interpretation with:

          msg[0]:  ACC_ACK (0x500)
          msg[3]:  0 if ACC_KEY was ignored or a given command was not
                   understood, 1 if some action was taken.

To prevent a deadlock if a program does not properly acknowledge a 
message, the sender should have some way to recover. An accessory 
could for example stop waiting for an acknowledgement after the next 
AC_OPEN, a main application might time out after a sufficiently long 
period.