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.11.4.3 View data from memory TOS In Version 1.04 of the View protocol a new message (VIEW_DATA) has been added, which is used to view data that has already been read into memory. To indicate the support of this new message, the string 'XViewData' must be within the viewer's Extended XAcc name. msg[0] = VIEW_DATA msg[3/4] = data // Pointer to data, incl. header (see below) msg[5/6] = length // Total length of header + data msg[7] = wid // Same as with VIEW_FILE (see above) where data points to: LONG type; // eg '.IMG' WORD head_length; // Offset to beginning of data, word alligned! CHAR[] name; // 0-terminated name of variable length If the type is 0, the viewer should try to figure it out itself. Other possible value for type are all file-types listed in 'What kinds of files can be displayed?' but without the 'X' at the beginning (e.g. 'Dump' means that starting at 'data + head_length', 'length - head_length' bytes should be displayed as a hex-dump). Please note that: . data has to point to an even adress, . data has to point to global readable memory, . head_length is even, . the data of the file is found at data + head_length and is in the same form, as it would be in a file of type type. The viewer receiving VIEW_DATA answers the same way as VIEW_FILE, but filename (= msg[3/4]) should be set to the value of data. The application must not free the memory pointed to by data before receiving the answer from the viewer; in case of a timeout it should ask the user what to do.