File Formats for Appleworks 4 Written: Rupert Lissner 2/84 Modified by: Rupert Lissner 3/86 John Kinder 8/88 AW 3 Modified by: Randy Brandt 1/94 AW 4 This document describes the file formats for AppleWorks 4 as of 1/94. This is not confidential information, and may be copied as necessary. This document may be revised from time to time to correct errors, clarify ambiguous definitions, or to report changes in the file formats. If you have questions, comments, or suggestions, send email to brandt@genie.geis.com. Definitions LSB: The least significant byte of a word. It is also the "left byte," the "first byte off the disk," and the "lower address in memory." As you can see, we're going to try to explain our buzzwords. MSB: The most significant byte of a word. Its address will be one higher than the address of the LSB, in memory, and on disk. If the total value of a word is less than 256D, this byte will be zero. MRL: Data base multiple record layout. SRL: Data base single record layout. RAC: Review/Add/Change screen 1W: Shorthand for "one word." You will also see references to bytes, in the form "3B," for example. 1BI: One byte integer. Values from 0 to 255 decimal. A value of decimal 50 will be stored as 32H. 1WI: One word integer. Bit 80 of the LSB has a value of 128 decimal. Bit 80 of the MSB is the sign bit. Bit 01 of the MSB has a value of 256 decimal. Boolean: A single byte that either zero ("false") or has the rightmost bit turned on ("true"). If the rightmost bit is on ("true") there may also be other bits on.These additional bits have no meaning. String: A 1BI followed by the number of characters shown in the value of the 1BI. ProDOS: Apple II 8-bit operating system. DB: AppleWorks Data Base SS: AppleWorks Spreadsheet WP: AppleWorks Word Processor AW: AppleWorks Bit 80: All bits are referred to by their hexidecimal value. 80 is the leftmost bit in a byte, 01 is the rightmost. "+" All addresses within an area will be relative to the first byte of the area. For example, the first byte of the area will be referred to as "Byte +0," the 10th byte would be "Byte +9." Hex/dec: All hexadecimal numbers will be shown with a trailing H as in 1CH. Decimal numbers may sometimes be shown with a trailing D. Numbers without a D or an H are decimal. Disk Directory Information Three file types are reserved for AW files: File type 19H Data Base File type 1AH Word Processor File type 1BH Spreadsheet The volume/subdirectory auxiliary type word (+1FH) is used by AW to control upper/lower case display of file names. Bit 80 of the LSB refers to the first character of the file name, bit 02 of the MSB refers to the 15th character, and so on. AW performs the following steps when it saves one of its files to disk: 1. Zero all 16 bits of the auxiliary type word. 2. Examine the file name for lower case letters. If one is found, change to "1" the corresponding bit in auxiliary type word and change the letter to upper case. 3. Examine the file name for spaces. If a space is found, change to "1' the corresponding bit auxiliary type word, and change the space to a period. When files are read from disk, the file name and auxiliary type information from the directory "file entry" are used to determine which characters should be lower case, and which periods should be displayed as spaces. If you use the auxiliary type bytes for a different purpose, AW will still display the file names, but it is likely that the wrong letters will be lower case. Data Base files Data Base files start with a variable length header, followed by 768 (formerly 600) bytes for each report format (if any), the "standard values" record, and then variable length information for each "record." The header contains category names, record selection rules, counts, screen positioning information and all other information that is not specific to one record. +000 - +001 1WI that is the number of bytes in the remainder of the header record. Use this count for your next ProDOS read from the disk. +002 - +015 Ignore these bytes. +016 Number of categories this file is currently sorted on. +017 - +029 Ignore these bytes. +030 Cursor direction when Return is pressed in SRL. 1H: Order in which you defined categories, or 2H: Left to right, top to bottom. +031 What direction should the cursor go when you press Return in the MRL? D)own or R)ight. +032 - +033 Ignore these bytes. +034 Style of display that Review/Add/Change was using when the file was saved: R: SRL. /: MRL. +035 1BI Number of categories per record. Values from 01H to 3CH +036 - +037 1WI Number of records in file. +038 1BI number of reports in this file, maximum of 30. +039 - +045 Ignore these bytes. +046 - +105 1BI For each of up to 60 columns, shows the number of spaces used for this column on the MRL. Be sure that you note that categories may have been rearranged on the MRL. Byte +046 refers to the leftmost column on the MRL. +106 - +165 1BI For up to 60 categories on the MRL, the defined category that appears in each position. Byte +106 is the leftmost column of the MRL, and has a value from 01H to 3CH that defines which of the category names appears in this position. These numbers change as a result of changing the layout of the MRL. +166 - +225 1BI For up to 60 categories on the SRL, the horizontal screen position. These are changed as a result of changing the layout of the SRL. AW makes sure that these entries, and the vertical screen positions, are kept in order from left to right within top to bottom. +226 - +285 1BI For up to 60 categories on the SRL, the vertical screen position. +286 - +345 1BI For up to 60 categories on the SRL, which of the category names appears in this position. These change as a result of changing the SRL. This number refers to the category names listed below. +346 Ignore this byte. +347 TitleColumn1 indicates first frozen column when titles are on +348 TitleColumn indicates last frozen column (0 if no titles) +349 LeftColDB +350 1BI Number of categories on MRL. Will be less than, or equal to the number of categories in the file. SRL displays all categories, so there is no equivalent number for SRL. +351 - +356 Ignore these bytes +357 - +358 1WI For first line of RAC selection rules. Zero means no selection rules, any other value refers to the category name that is tested. MSB will always be zero. +359 - +360 1WI Category name for second line of RAC selection rules. Zero means that there is only one line. +361 - +362 1WI. Category name for third line of RAC selection rules. Zero means that there is no third line. +363 - +364 1WI. For first line of RAC rules, which of the tests is to be applied. 1 means "equals," 2 means "greater than" and so on. +365 - +366 Test for second line of rules, if any. +367 - +368 Test for third line, if any. +369 - +370 1WI Continuation code for first line: 1: And, 2: Or, 3: Through. +371 - +372 1WI Continuation code for second line. +373 - +374 1WI Continuation code for third line. Not possible, so always zero. +375 - +406 String, max length 30 bytes. Comparison information for first line RAC selection rules. +407 - +438 Comparison for 2nd line. +439 - +470 Comparison for 3rd line. +471 Number of first category with rules defined. If non-zero, rule records will follow the report records (if any). +472 Number of last category with rules defined. Determines how many rule records will be stored in the file. +473 - +599 Ignore these bytes +600 - +719 1W Formatting codes for each category +720- +723 Ignore these bytes +724 Lookup count (0 means no lookup defined) +725 - +1097 Ignore these bytes +1098- +1119 Name of the first category. A string, maximum length 20 bytes. If the file has only one category, the header record will end here. +1120- +1141 Name of the second category, if any. This area will not be on the header record if there is only one category. +1142... Additional 22 byte entries for all remaining categories. The size of the header record depends on the number of categories. Space is not maintained past the last category. Report Records follow the header record. One of the header record categories tells you how many report records to expect. The number will be from 0 to 30. Each report record is 768 bytes, and contains: +000 - +019 String (max 19) Report name +020 - +079 Column width (1BI) for up to 60 columns a tables style report format. Byte +020 is for the leftmost column on a tables style report. For labels style report formats, the value is a 1BI that has the horizontal position of this category, relative to the left margin. +080 - +139 For tables style: Number of spaces to be printed at the right of justified columns. For labels style: Vertical position on the report for each of up to 60 categories. 1BI. A value of 1 means that category is on first line of labels style report. +140 - +199 For up to 60 columns of tables style: Values from 1 to 60D refer to which category name appears in this column on the report. For labels style: Same as tables style. +200 - +259 For up to 60 columns of tables style, boolean whether or not foot totals are defined. For labels style: For up to 60 categories on report, boolean whether or not category names are to be printed. +260 - +319 For up to 60 columns of tables style: boolean whether or not left justified. For up to 60 categories of labels style: Boolean whether or not to float (OA-J) this category up against the category to its left. +320 1BI. Columns per page for label reports (add 1 to value for literal) +321 1BI. Number of categories on report. +322 1BI. Labels style only. Values from 3H to 21D. Position of line on the screen that says "Each record will print nn lines." +323 Tables style only: If there is a group total column, a 1BI stating which of the category names is used as a basis. Values from 1D to 60D. +324 Platen width value, in 10ths of an inch. For example, a value of 8.0 inches entered by the user will show as 80D or 50H. +325 Left margin value. All inches values are in 10ths. +326 Right margin value. +327 Characters per inch. 1BI. +328 Paper length value. 10ths of an inch. +329 Top margin value. +330 Bottom margin value. +331 Lines per inch. 6H or 8H. 1BI. +332 Not relevant. Probably always a "C". +333 Type of report format. H: tables style, V: labels style. +334 Spacing: S(ingle, D(ouble, or T(riple. +335 Print report header. Boolean. +336 Tables style: If user has specified group totals, Boolean: just print the group totals. +337 Labels style: Boolean, omit line when all entries on line are blank. +338 Labels style: Boolean, keep number of lines the Same within each record. +339 - +420 80 byte string. Title line, if any. +421 Ignore this byte. +422 - +435 If user has specified "Send special codes to printer," this is a 13 byte string containing those codes. +436 Boolean: Print a dash when an entry is blank. +437 Count of categories defined to auto-sort +438 - +446 Auto-sort rules (category numbers, sort type) +447 - +560 Record selection rules. Exact same format as described in the header record. +561 - +741 Reserved +742 - +767 Unused Rule records follow the report records. If no rules are defined (+471 in header is 0), nothing is stored on disk. If rules are defined, +472 in the header determines when the final rule record has been reached. +0 The category number this rule is assigned to. +1 The length of the rule definition. +2... The rule definition (length equal to +1) Additional rule records follow up to the category number specified in +472. The lookup record, if any, follows the rule records. Header byte +724 determines if a lookup record is present. +0 The length of the lookup definition. +1 The lookup definition. Data records follow the layout record. The first data record contains the standard values. Each following data record corresponds to one data base "record." These records contain all of the categories within one stream of data. The category entries are in the same order that the category names appear in the header record. Bytes +0 and +1 are a Word that contains a count of the number of bytes in the remainder of the record. Byte +2 of each record will always be a control byte. Other control bytes within each record define the contents of the record. Control bytes may be: 01-7FH This is a count of the number of following bytes that are the contents of a category. 81-9EH This (minus 80) is a count of the number of categories to be skipped. For example, 82H means skip two categories; 87H means skip seven categories. FFH This indicates the end of the record. The information in individual categories may have some special coding so that date and time entries can be arranged (sorted). Date entries will have the following format: +000 C2H (194D). Identifies a date entry. (pre-AW 4 was C0H) +001 - 004 Ascii year code, like 1994 (pre-AW 4 was 2 bytes only) +005 Ascii month code. A means January, L means December. +006 - +007 Ascii day of the month. Time entries will have the following format: +000 D4H (212D). Identifies a time entry. +001 Ascii hour code. A means 00 (the hour after midnight). X means 23, the hour before midnight. +002 - +003 Ascii minute code. Values from 00 to 59. This is the end of the data base file layouts. At last. Word Processor files Word Processor files start with a 300 byte header, followed by a number of variable length line records, one for each line on the screen. The header contains the following information: +000 - +003 Not used. +005 - +084 Initial tab settings. Either equal sign ('='), less than ('<'), greater than ('>'), a caret ('^') or a period ('.'): left tab, right tab, center tab or decimal tab respectively. This is only the initial tab ruler. Additional tab rulers are imbedded in the documents as tab ruler lines. +085 Zoom switch. Boolean. +086 - +089 Four bytes not used. +090 Boolean, whether file is currently paginated, ie., whether the page break lines are showing. +091 Minimum left margin that should be added to the margin that is appearing on the screen. This is normally one inch, shown in 10ths of an inch, 10D or 0AH. +092 Mail Merge present if bit 01 is set. This file was loaded as a text file if bit 20 is set, and has MS-DOS CR/LF pairs if bit 10 is set. +093 - +094 Row number of where the document needs to be reformatted from. +095 - +175 (81 bytes) current tab rulers +176 Any Rulers +177 - +178 Ruler current +179 - +180 Ruler next +181 Ruler current Valid (Boolean) +182 Ruler next Valid (Boolean) +183 Minimum version of AppleWorks required to read this document +184 - +199 (16 bytes) Reserved for macros +200 Remove pagination (was not able paginate the full document). +201 - +249 Not used. +250 - +299 Available. Will Never be used by AppleWorks. If you are creating AW WP files, you can use this area to keep information that is important to your program. Line records are of three different types. The first line record after the 300 byte header corresponds to line 1, the next is line 2, and so on. The first two bytes of each line record contain enough information to establish the type. Carriage return line records have a D0H (208D) in byte +001. Byte +000 is a 1BI between 00 and 79D that is the horizontal screen position of this carriage return. First line in v3.0 is +000 00 +001 30 Command line records are formatting commands that appear on the screen in the form --------Double Space, for example. These can be identified by a value greater than D0H (208D) in byte +001. They are: Byte +001 Command Byte +000 D4H reserved (used internally as ruler) D5H Page header end D6H Page footer end D7H Right Justified D8H Platen width 10ths of an inch D9H Left margin 10ths of an inch DAH Right margin 10ths of an inch DBH Chars per inch 1BI. DCH Proportional-1 No meaning DDH Proportional-2 DEH Indent 1BI characters DFH Justify E0H Unjustify E1H Center E2H Paper length 10ths of an inch E3H Top margin 10ths of an inch E4H Bottom margin 10ths of an inch E5H Lines per inch 1BI. E6H Single space E7H Double space E8H Triple space E9H New page EAH Group begin EBH Group end ECH Page header (begin) EDH Page footer (begin) EEH Skip lines 1BI count EFH Page number 1BI F0H Pause each page F1H Pause here F2H Set marker 1BI marker number F3H Page number 1BI (add 256) F4H Page break 1BI page number F5H Page break 1BI (add 256) F6H Page break 1BI (break in middle of paragraph) F7H Page break 1BI (add 256, in middle of para.) FFH End of file Text records are the lines where text has been typed. The format is: +000 - +001 Word. Number of bytes following this word. Since the maximum is about 80D, byte +001 is always zero. Use byte +001 to identify text lines. +002 Screen column for the first text character. Usually will be zero, but may vary as a result of left margin, centering, and indent commands (If FFH, this text line is actually a rulerQASCII equivalent of what appears on the top of the screen). +003 80 bit: If on, there is a carriage return on the end of this line. If off, no carriage return. Remaining 7 bits: Number of bytes of text following this byte. +004 - nnn Actual text bytes. Consists of Ascii characters and special codes from 01H to 1FH which indicate special formatting features: Code Meaning 01H Begin boldface 02H Boldface end 03H Superscript begin 04H Superscript end 05H Subscript begin 06H Subscript end 07H Underline begin 08H Underline end 09H Print page number 0AH Enter keyboard 0BH Sticky space 0CH Begin Mail Merge Token 0EH Print Date 0FH Print Time 10H Special Code 1 11H Special Code 2 12H Special Code 3 13H Special Code 4 14H Special Code 5 15H Special Code 6 16H Tab character 17H Tab fill character 18H DeskJet alternate codes (Code flag entered with Ctrl-A) This is the end of the word processor file layout. Spreadsheet files Spreadsheet files start with a 300 byte header record that contains basic information about the file, including column widths, printer options, window definitions, and standard values. The spreadsheet header record contains the following entries: +000 - +003 Skip 4 bytes. +004 - +130 1BI containing the column width for each column. +131 Order of recalculation. Ascii R or C. +132 Frequency of recalculation. Ascii A or M. +133 - +134 Last row referenced. Word. +135 Last column referenced. 1BI. +136 Number of windows: Ascii 1: just one window, S: side by side windows, T: top and bottom windows. +137 Boolean. If there are two windows, are they synchonized? +138 - +161 The next 20 (approx) variables are for the current window. If there is only one window, it is the current window. If there are two windows, the current window is the window that had the cursor in it. +138 Window standard format for label cells. 2H: left justified, 3H: right justified, 4H: centered. +139 Window standard format for value cells. 2H: fixed, 3H: dollars, 4H: commas, 5H: percent, 6H: appropriate +140 More of window standard format for value cells. Number of decimal places to display. Values from 0 to 7H. +141 Top screen line used by this window. This is the line that the =====A=========B==== appears on. Normally 1H unless there are top and bottom windows. +142 Leftmost screen column used by this window. This is the column that the hundreds digit of the row number appears in. Normally 0H unless there are side by side windows. +143 - +144 Top, or first, row appearing in titles area. This will probably be zero if there are no "top" titles. +145 Leftmost, or first, column appearing in left side titles area. This will probably be zero if there are no left side titles. +146 - +147 Last row appearing in top titles area. This will probably be zero if there are no top titles. +148 Last column appearing in left side titles area. This will probably be zero if there are no left side titles. +149 - +150 Top, or first, row appearing in the body of the window. The body is defined as those rows that are on the screen, but not in the titles area. +151 Leftmost, or first, column appearing in the body of the window. +152 The screen line that the top body row goes on. Normally 2H unless there are top titles, or top and bottom windows. +153 Leftmost screen column used for the leftmost body column. Normally 4H unless there are side titles, or side by side windows. +154 - +155 Bottommost, or last, row appearing in this window. +156 Rightmost, or last, column appearing in this window. +157 The screen line that the last body row goes on. Normally 13H (19D) unless there are top and bottom windows. +158 The rightmost screen column used by this window. Normally 4EH (78D) unless there are side by side windows. +159 1BI. Number of horizontal screen locations used to display the body columns. Normally 48H (72D), because 8 columns of 9 characters each are the standard display. This is effected by side by side windows, side titles, and variable column widths. +160 Boolean. Rightmost column is not fully displayed. This can only happen when the body portion of the window is narrower than the width of a particular column. +161 Titles switch for this window. Bit 80: top titles, Bit 40: side titles. These bits represent top titles, side titles, both, and no titles. +162 - +185 Window information for the secondary window. This is meaningful only if there are two windows. This is the information for the window that the cursor is not currently in. See the descriptions for the current window (+138 - +161). +186 - +212 Not currently used. +213 Boolean, cell protection is on or off. +214 Not currently used. +215 Platen width value, in 10ths of an inch. For example, a value of 8.0 inches entered by the user will show as 80D or 50H. +216 Left margin value. All inches values are in 10ths. +217 Right margin value. +218 Characters per inch. 1BI. +219 Paper length value. 10ths of an inch. +220 Top margin value. +221 Bottom margin value. +222 Lines per inch. 6H or 8H. 1BI. +223 Spacing: S(ingle, D(ouble, or T(riple. Expect these three letters, even in European versions. +224 - +237 If user has specified "Send special codes to printer," this is a 13 byte string containing those codes. +238 Boolean: Print a dash when an entry is blank. +239 Print report header. Boolean. +240 Boolean. Zoomed in to show formulas. +241 FCF enable: fast calculation feature. (added V2.1) +242 SSMinVers: minimum version required. 0 means any version, 30D means version 3.0 or later. +243 - +258 Reserved for UltraMacros +259 Number of times to recalculate. Bit 80 signifies recalculate before printing this file. +260 - +279 Reserved +280 - +299 Available. If you are creating AW SS files, you can use this area to keep information that is important to your program. Row records contain a variable amount of information about each row that is non-blank. Each row record contains enough information to completely build one row of the spreadsheet: +000 - +001 Number of additional bytes to read from disk. FFFFH means end of file. If SFMinVers is not zero, skip first two bytes. +002 - +003 Word. Row number +004 Beginning of actual information for the row. This byte of each record will always be a control byte. Other control bytes within each record define the contents of the record. Control bytes may be: 01-7FH This is a count of the number of following bytes that are the contents of a cell entry. 81-FEH This (minus 80) is a count of the number of columns to be skipped. For example, 82H means skip two columns. FFH This indicates the end of the row. Cell entries contain all the information that is necessary to build one cell. There are several types: Value constants are cells that have a value that cannot change. This means that someone typed a constant into the cell, 3.14159, for example. +000 Bit 80 is always on. Bit 40 on means that if the value is zero, display a blank instead of a zero. This is for pre-formatted cells that still have no value. Bit 20 is always on. Bit 10 on means that labels cannot be typed into this cell. Bit 08 on means that values cannot be typed into this cell. Bits 04, 02, and 01 specify the formatting for this cell: 0: Exponential Notation 1: Use spreadsheet standard 2: Fixed 3: Money (Dollars) 4: Commas 5: Percent 6: Appropriate 7: Date +001 Bit 80: always zero. Bit 40: always zero. Bit 20: always zero. Bits 04, 02, 01. Number of decimal places for fixed, money, commas, exponential or percent formats. +002 - +009 8 byte Apple SANE numerics double format floating point number. Value formulas are cells that contain information that has to be evaluated. Formulas like AA17+@Sum(r19...r21), and @Error are examples. Specific format: +000 Bit 80 is always on. Bit 40 on means to not display the cell. This was originally intended for pre-formatted cells that still have no value. If a value is placed in this cell, be sure to turn off this bit. Bit 20 is always off. Bits 10, 08, 04, 02, and 01 are the same as value constants. +001 Bit 80: always on. Bit 40: On indicates that the last evaluation of this formula resulted in an @NA. Bit 20: On indicates that the last evaluation of this formula resulted in an @Error. Bit 10: Indicates that the cell needs to be recalculated. (added V2.1) Bit 08: If on, means the value returned from the function was a string instead of a SANE double format number. Formulas containing @Lookup, @Choose, @If and @Label, etc. can all return labels as their results. Bits 04, 02, 01 same as value constants. or the same a label constants. +002 - +009 If a value was returned: 8 byte SANE double floating point number that is the most recent evaluation of this cell. If a label was returned: A cell reference to the cell containing the label. It consists of a cell reference marker (FEH) followed by the row number (01H to 7FH) and column number. Unlike cell references in formulas, these are absolute references. Bytes 05 to 09 are unused. +010 - nnn Various control bytes that are "tokens" representing the formula that was typed in by the user. They are: Byte Means B6H @Mid ;new in AW 4 B7H @Find B8H @Join B9H @Val BAH @Upper BBH @Lower BCH @Len BDH @Text BEH @Date BFH @Alert C0H @Deg C1H @Rad C2H @Pi (followed by 3 bytes of zero) C3H @True (followed by 3 bytes of zero) C4H @False (followed by 3 bytes of zero) C5H @Not C6H @IsBlank C7H @IsNa C8H @IsError C9H @Exp CAH @Ln CBH @Log CCH @Cos CDH @Sin CEH @Tan CFH @ACos D0H @ASin D1H @ATan2 D2H @ATan D3H @Mod D4H @Fv D5H @Pv D6H @Pmt D7H @Term D8H @Rate D9H @Round DAH @Or DBH @And DCH @Sum DDH @Avg DEH @Choose DFH @Count E0H @Error (followed by 3 bytes of zero) E1H @Irr E2H @If E3H @Int E4H @Lookup E5H @Max E6H @Min E7H @Na (followed by 3 bytes of zero) E8H @Npv E9H @Sqrt EAH @Abs EBH Signifies file linking ECH <> (not equal) EDH >= (greater than or equal to) EEH <= (less than or equal to) EFH = (equals) F0H > (greater than) F1H < (less than) F2H , (comma) F3H ^ (exponentiation sign) F4H ) (right parenthesis) F5H - (minus) F6H + (plus) F7H / (divide) F8H * (multiply) F9H ( (left parenthesis) FAH - (unary minus. Ex: -A3) FBH + (unary plus. Ex: +A3) FCH ... (dots) FDH Next 8 bytes are SANE double number FEH Next 3 bytes are row, column reference. FFH Next n bytes are a pascal type string. Two of the codes require special information. Code FDH indicates that the next 8 bytes are a SANE numerics package "double" precision floating point number. All constants within formulas are carried in this manner. Code FEH indicates that the next three bytes point at a cell: +000 FEH +001 Column reference. Add this 1BI to the column number of the current cell to get the column number of the pointed at cell. This value is sometimes negative, but Add always works. +002 - +003 Row reference. Word. Add this word to the row number of the current cell to get the row number of the pointed at cell. This value is sometimes negative, but Add always works. Value labels are cells whose function has returned a label value. Formulas like @Lookup, @Choose and @IF can all return labels as their results. Specific format: +000 Bit 80 is always on. Bit 40 on means to not display the cell. This was originally intended for pre-formatted cells that still have no value. If a value is placed in this cell, be sure to turn off this bit. Bit 20 is always off. Bits 10, 08, 04, 02, and 01 are the same as value constants. +001 Bit 80: always on. Bit 40: On indicates that the last evaluation of this formula resulted in an @NA. Bit 20: On indicates that the last evaluation of this formula resulted in an @Error. Bit 08: Is always on. Bits 04, 02, 01 same as value constants. +002 - +005 8 byte SANE double floating point number that is the most recent evaluation of this cell. +006 - +009 Not used. +010 - nnn Various control bytes that are "tokens" representing the formula that was typed in by the user. They are the same as above. Propagated label cells are labels that place one particular ascii character in each position of a window. Handy for underlining. +000 Bit 80 is always zero. Bit 40 is meaningless. Bit 20 is always on. Bit 10 and bit 08 are protection, just like value cells. Bits 04, 02, 01 are meaningless. Put a 1 here. +001 This is the actual character that is to be put in each position in the cell. Regular label cells contain alphanumeric information, such as headings, names and other descriptive information that is not the basis for calculations. +000 Bits 80, 40, 20 are always zero. Bits 10 and 08 are same as value cells. Bits 04, 02, and 01 determine cell formatting: 01: Use spreadsheet standard formatting 02: Left justify 03: Right justify 04: Center +001 - +nnn Ascii characters that actually display. The actual length was defined earlier in the word that contained the "actual number of bytes to read from disk." This is the end of the spreadsheet file format. File Tags (added v3.0 by Randy Brandt) All AW files normally end with $FFFF; tags are anything after that. Because pre-3.0 AW versions stop reading a file when $FFFF is encountered, they simply ignore tags. The Word Processor in AppleWorks 4 uses tags for storing mail-merge and glossary information. The Outliner for AppleWorks also uses Word Processor tags. TimeOut Graph uses tags in Spreadsheet files. Third-party developers may request a tag ID by contacting Randy Brandt (brandt@genie.geis.com). Tag file structure: +000 TimeOut ID; $ff if not a TimeOut tag +001 2nd ID byte; user-definable +002 data length lo (TagCount (1-64) if end of tags) +003 data length hi ($ff here means end of tags) +004 actual data followed by next 4-byte tag ID max 64 tags per file (1 page TagTable), max size is 2k per tag Tag table structure in memory: table pointer stored at DTFTag +000 TimeOut ID; $ff if not a TimeOut tag +001 2nd ID byte; user-definable +002 memory pointer lo +003 memory pointer hi (followed by next 4-byte tag ID) This is the end of AppleWorks file formats.