Appendix

• • • • • • • • • • • • • • • • • • • • •

Appendix A: WordPerfect .SET File Packets

The information contained in the WP{WP}.SET file contains all the setup functions of the Shift-F1 function in WP5.0/5.1. The format of the .SET file prefix and packets are listed below. The structure of each of the packets follows the packet list.

The 16-byte prefix header for .SET files:

Field	Size	Meaning

WPCorp File ID	4 bytes	þ1,"WPC"

Start of Document	Double word Pointer to end of file

Product Type	1 byte	1

File Type	1 byte	11h

Major Version #	1 byte	1 for WP5.1 (0 for WP5.0)

Minor Version #	1 byte	0

Encryption Key	1 word	0 = not encrypted

Reserved	1 word	0

The special header index is 10 bytes long and has the following structure:

Offset	Size	Usage

0	1 word	Packet type for header index (0FFFBh).

2	1 word	# of indexes (including header). For .SET files, this # is five, this index block header and 4 packets.

3	1 word	Size of index block (# of indexes * 10).

4	Double word	File position of next index block from beginning of prefix

Packets in the index block are also 10 bytes long and have the following structure:

Offset	Size	Usage

0	1 word	Packet type

2	Double word	Length of data packet

6	Double word	File position of packet's data

WordPerfect 5.0

Value	Packet Type

1h	Reserved

2h	Printer's default font name string

3h	PS table list (WP5.1 packet 5Dh)

4h	Font list (WP5.1 packet 57h)

5h	Reserved

6h	Font string pool (WP5.1 packet 59h)

7h-0Fh	Reserved

Value	Packet Type

10h	Dictionary/Thesaurus path names (WP5.1 packet 5Eh)

11h	Monitor attributes (WP5.1 packet 51h)

12h	Miscellaneous (changeable only in Setup) (WP5.1 packet 52h)

13h	Control and Alt key mapping (WP5.1 packet 53h)

14h	Document initial codes (WP5.1 packet 5Ah)

15h	Reserved

16h	Reserved

17h	Miscellaneous (saved only at end of Setup) (WP5.1 packet 55h)

18h	Reserved

19h	Reserved

1Ah	Default printer, old (WP5.1 packet 54h)

1Bh	Selected printers, old (WP5.1 packet 5Ch)

1Ch	Print options (WP5.1 packet 56h)

1Dh	Default printer (WP5.1 packet 54h)

1Eh	Selected printer list (WP5.1 packet 5Ch)

WordPerfect 5.1 Screen Attribute Packets

Value	Packet Type

20h	MONO

21h	CGA

22h	PC3270

23h	EGA (Italics)

24h	EGA (Underline)

25h	EGA (Small caps)

26h	EGA (Reserved)

27h	EGA (Reserved)

28h	EGA (Reserved)

29h	EGA (Reserved)

2Ah	HRF (12 fonts)

2Bh	HRF (6 fonts)

2Ch	HRF (Reserved)

2Dh	HRF (Reserved)

2Eh	HRF (Reserved)

2Fh	HRF (Reserved)

30h	NEC PC-9801

Miscellaneous Set Packets for 5.1

Value	Packet Type

50h	Reserved

51h	Monitor attributes

52h	Miscellaneous (cclim, sbeep, bktime, etc.)

53h	Control and Alt key mapping

Value	Packet Type

54h	Default printer

55h	Miscellaneous (saved only at end of Setup)

56h	Print options

57h	Font list

58h	Serial/license #

59h	Font string pool

5Ah	Document initial codes WP5.1

5Bh	Reserved

5Ch	Selected printers

5Dh	PS table list

5Eh	Auxiliary path names

Packet 02h — Printer's Default Font Name String (WP5.0)

This packet is a variable-length, null-terminated string. This string is the name of the current default printer's default font.

Packets 20h to 30h — Screen Attributes

First, the hardware bits are masked off and saved. Second, WordPerfect searches the WP attributes to find the displayable attributes. If the WP attribute is not found, the default (last entry) is used. The hardware bits are then ORed back in (since they can be displayed without exception).

Attributes for Document Screen 1

Offset	Size	Meaning

0	1 byte	# of entries in Attribute Table

1	150 bytes	Attribute Table

(Byte)	(Double Word)

Displayable	WP attributes

attributes	(see format below)

..	..

..	..

..	..

Note: The last ten entries of the table are reserved.

151	1 word	Hardware low word mask used to mark if hardware can perform attributes.

153	1 word	Hardware high word mask (see hardware low word).

Attributes for Document Screen 2

Offset	Size	Meaning

155	1 byte	# of entries in Attribute Table

156	150 bytes	Attribute Table

(Byte)	(Double Word)

Displayable	WP attributes

attributes	(see format below)

..	..

..	..

..	..

Note: The last ten entries of the table are reserved.

307	1 word	Hardware low word mask used to mark if hardware can perform attributes.

309	1 word	Hardware high word mask (see hardware low word).

The WP Attribute Format

First Word of Text Attributes

Bit Set	Meaning

0	Chapter heading

1	Heading

2	Subheading

3	Small print

4	Fine print

5	Superscript

6	Subscript

7	Outline

8	Italics

9	Shadow

10	Redline

11	Double underline

12	Bold

13	Strikeout

14	Underline

15	Small caps

Second Word, First Byte of Text Attributes

Bit Set	Meaning

0	Blink

1	Reverse video

Bits 2–7	Reserved

Second Word, First Byte of Text Attributes (attributes that imply a point size change)

Value	Meaning

01111111b	Size

Packet Type 50h — Reserved

Packet Type 51h — Monitor Attributes (Packet 11h in WP5.0)

This fixed-length packet contains miscellaneous information about the display monitor:

Offset	Size	Meaning

0	1 byte	EGA font index (see Setup/Colors in WordPerfect Reference)

0FFh = Normal font only

00h = Italics font

01h = Underline font

02h = Small caps font

03h = 512 character font

1	1 byte	Hercules Graphics card index

00h = 6-character font

01h = 12-character font

2	1 byte	Hercules InColor card foreground color

3	1 byte	Hercules InColor card background color

4	1 byte	Hercules InColor card cursor color

5	1 byte	Hercules InColor card underline color

6	1 byte	Hercules InColor card strikeout color

7	1 byte	Hercules InColor card high intensity color

8	1 byte	Fast text option

00h = Slower text for older video cards to avoid "snow" on the screen

01h = Fast text for normal display

Packet Type 52h — Miscellaneous (changeable only in Setup) (Packet 12h in WP5.0)

Miscellaneous default variables (changeable only in Setup). This fixed-length packet contains miscellaneous initialization information that can only be modified with Setup.

Offset	Size	Meaning

0	1 byte	Beep flag

bit 0 = beep on search failure (1 = y)

bit 1 = beep on error (1 = y)

bit 2 = beep on hyphenation (1 = y)

bit 3 = column display mode (0 = side-by-side)

bit 4 = display comments (1 = y) (default = ON)

bit 5 = display summary (default = OFF)

bit 6 = unused

bit 7 = auto enter doc info when file is saved (1 = y)

Offset	Size	Meaning

1	1 word	Hard return character

3	1 byte	Display filename flag

bit 0 = display filename (1 = y)

4	1 word	Time between backups (high=hours, low=minutes)

6	1 byte	Backup flag

bit 0 = original document backup (1 = y)

bit 1 = timed backup active (1 = y)

7	1 byte	Flag for auto reformat

bit 0 = enable

bit 1 = needed

bit 2 = auto format in progress

bit 3 = need to reset top of display

8	1 byte	Graphics driver type

0 = None or text

1 = Hercules

2 = CGA

3 = EGA (co40, co80)

4 = EGA (mono)

5 = EGA (Hi Res 4-color)

6 = EGA (Hi Res 16-color)

7 = VGA (16-color)

8 = VGA (mono)

99 =	Any other screen driver (nonresident) contains the path/filename for the driver

9	1 byte	Default unit for conversion routines

10	1 byte	Horizontal position unit (status line)

11	1 byte	Vertical position unit (status line)

12	1 byte	Mnemonic menu selection attribute (bold)

13	1 byte	Keyboard speedup value (1–5, 0 = normal)

14	1 byte	Sys file flags (1 = y)

bit 0 = fast save flag

bit 1 = format retrieved docs for default printer added for WP5.1

bit 2 = merge codes display in document added for WP5.1

bit 3 = alternate keyboard added for WP5.1

15	20 bytes	Document summary subject search string

35	1 word	Graphics driver type 0 = mono, 1 = color

37	36 bytes	Reserved for graphics driver info

73	21 bytes	Default document type that is used during document management

94	13 bytes	Graphics driver filename

107	1 byte	Main menu index

Offset	Size	Meaning

108	1 byte	Second menu index

109	1 word	Graphic driver parameter: 1 byte mode, 1 byte ID

Text Driver Packet Definitions — Packet 52h in .SET File

Offset	Size	Meaning

111	34 bytes	Current menu string

145	13 bytes	Filename

158	1 byte	Main menu index

159	1 byte	Second menu index

160	1 word	Text driver parameter: 1 byte mode, 1 byte ID

162	12 bytes	Unused

174	1 byte	Current view mode and preview flags for print preview

bits 0–2 view mode (see flags in WPWDEF.INC)

bit 3 = 1 if we want to show positive of page

bit 4 = available

bit 5 =	1 if "view graphics in black and white" = Yes in Setup

bit 6 = 1 graphics menu bold as color

bit 7 = 1 if "view doc in black on white" = Yes in Setup

175	1 byte	Mouse menu mnemonic attribute

176	1 byte	Mouse menu text attribute

177	1 byte	Menu bar mnemonic attribute

178	1 byte	Menu bar text attribute

179	1 byte	Menu bar separator, 1 = Yes

bit 0 = division line selected

bit 1 = remain visible

180	1 byte	Type of mouse (BUS, SERIAL, NEITHER)

181	1 byte	Default mouse port (COM1)

182	1 byte	Unused

183	1 word	Mouse acceleration factor—1200ths (.025þ = 30)

185	1 word	Mouse submenu delay time (3 per .05 seconds)

187	1 byte	Options flag

bits 0–1 Hyphenation:

1 never prompt

2 prompt when required

3 always prompt

bit 2 available

bit 3 available

bit 4 = 1 if "create doc summary on save/exit" = Yes

bit 5 = 1 if "document management" = Yes

bit 6 = 0 if dictionary, 1 if algorithm hyphenation

Offset	Size	Meaning

188	1 byte	Align_center+(pos_mid SHL 3)

Equation options

bits 0–2 equation horizontal alignment	0 left aligned

1 right aligned

2 center aligned

bits 3–5 equation vertical alignment

1 top aligned

2 center aligned

3 bottom aligned

bit 6 available

bit 7 = 1 print equation as text

189	1 word	Mouse double click time (14 * .05 seconds = .7 sec)

191	1 byte	Alt key selects pull down menus:

= 0 Alt key does not select menus

= 1 Alt key selects menus

192	1 byte	= 0 not using left-handed mouse

= 1 using left-handed mouse

193	1 word	Equation base font size (0 = default)

195	1 byte	ID (file position) of mouse

196	13 bytes	Filename

209	45 bytes	Reserved for mouse driver information

Note:	The following is unique to WPWin 5.1.

254	1 byte	Preferences Environment flags

bit 0 = 1 if Confirm on Code Deletion is on

bit 1 = 1 if Auto Code Placement is on

bit 2 = 1 if Ruler — Show Ruler Guides is on

bit 3 = 1 if Ruler — Snap to Ruler Grid is on

bit 4 = 1 if Display Last Open Files is on

bit 5 = 1 if Allow Undo is on

bit 6 = 1 if Ruler Buttons on Top is on

bit 7 = 1 if Show Ruler in Document is on

255	1 byte	Preferences Display flags

bit 0 = 1 if Vertical Scrollbar Display is on

bit 1 = 1 if Horizontal Scrollbar Display is on

bit 2 = 1 if Graphics is on (in View menu)

bit 3 = 1 if Text in Windows System Colors in on

bit 4 Reserved

bit 5 = 1 if Status line display is on

Offset	Size	Meaning

256	1 word	Print Preview flags

bit 0 = 1 if no view defined

bit 1 = 1 if 100%

bit 2 = 1 if 200%

bit 3 = 1 if Entire Doc.

bit 4 = 1 if Zoom to Full Width

bit 5 = 1 if Zoom Area

bit 6 = 1 if Facing Pages

bit 7 = 1 if 1 pg

bit 8 = 1 if 2 pg

bits 9-15 Reserved

258	1 word	Print Preview X origin

Designates the window origin at the time the user exited print preview, only if he was in a zoom mode at the time. Otherwise it is zero.

260	1 word	Print Preview Y origin

Packet Type 53h — Control and ALT Key Mapping (Packet 13h in WP5.0)

Keyboard Filenames

This fixed-length packet contains the null-terminated filename of the startup keyboard definition file:

Offset	Size	Meaning

0	13 bytes dup(0),0	Keyboard name

14	13 bytes dup(0),0	Equation keyboard name

Packet Type 54h — Default Printer (Packets 1Ah and 1Dh for WP5.0)

This fixed-length packet contains information about the default printer. The structure is outlined below:

Offset	Size	Meaning

0	37 bytes	Long name of .PRS file

37	13 bytes	Actual .PRS filename

50	27 bytes	Descriptor for initial font (see packet 0Fh for format)

77	1 word	Minimum top margin

79	1 word	Minimum bottom margin

81	1 word	Minimum left margin

83	1 word	Minimum right margin

85	1 byte	Flags

86	1 byte	Port # (value = FFh if a file/path, or network print queue is used.)

87	1 byte	Byte to initialize serial port

88	1 byte	Network printer flag

89	1 byte	Network form #

Offset	Size	Meaning

90	80 bytes	Full pathname for non-port device

170	67 bytes	Pathname only—for auxiliary printer files

237	1 word	Date

239	1 word	Time

Note:	In WP5.0 packet 1Ah/1Dh, the last three bytes of the 5.1 "font descriptor" do not exist. See offset 50. The "point size" word and the "type face definition flags" byte fields did not exist in the WP5.0 "font descriptor" field of 1Ah/1Dh. This makes 1Ah/1Dh shorter by three bytes.

Packet Type 55h — Miscellaneous (saved only at end of Setup) (Packet 17h for WP5.0)

This fixed-length packet contains miscellaneous default variables for initialization information that can be entered with Setup, or from outside Setup.

Offset	Size	Meaning

0	1 word (8)	"N," use in counting for cursor movement

2	1 byte (12h)	Table of authorities def byte

bit 0 = permit underlining (1 = y)

bit 1 = dot leader (1 = y)

bit 4 = blank line between authorities (1 = y)

3	64 bytes	String for date display style

67	1 byte	Fill byte (End of WP5.0 packet)

Added for WP5.1:

68	1 byte	Fill byte

69	1 byte (20h)	Wysiwyg editing flag added for WPWin 5.1

bits 1,0 = 0 text; = 1 graphics; = 2 wysiwyg

bit 2 = 1 if doing wysiwyg display justification

bit 3 = 1 if doing wysiwyg display graphics

bit 4,5 = cursor height (0=full; 1=1 pixel; 2=2)

70	1 word (256)	Wysiwyg horizontal scale factor (256 = 100%) added for WPWin 5.1

72	1 word (256)	Wysiwyg vertical scale factor (256 = 100%) added for WPWin 5.1

74	20 bytes	Merge—begin record delimiter

94	20 bytes	Merge—end record delimiter (13)

114	20 bytes	Merge—begin field delimiter

134	20 bytes	Merge—end field delimiter (",")

154	20 bytes	Merge—characters to be removed

174	1 word	Reveal Codes window size

Packet Type 56h — Print Options (Packet 1Ch for WP5.0)

Print Options Information

Offset	Size	Meaning

0	1 word	# of copies (1)

2	1 word	Binding width (0)

4	1 byte	Network—form # to use (0–31)

5	1 byte	Network banners printed? (0 = no)

6	1 byte	Document flags (0)

7	1 byte	23h

8	1 word	Redline character ("|")

10	1 byte	Print to file (0 = no) (End of WP5.0 packet)

Print flags added for WPWin 5.1

01h — no banding for windows printing

02h — feh not used

Added for WP5.1:

11	1 word	200%—extra large

13	1 word	150%—very large

15	1 word	120%—large

17	1 word	80%—small

19	1 word	60%—fine

21	1 word	60%—sup/sub (default same as fine)

Packet Type 57h — Font List (Packet 04h in WP5.0)

This packet has the same format as Packet Type 15 (0xF) of the document file format (see the WordPerfect section for more information) except that it contains only the default printer font.

Packet Type 58h — Serial License Number

Packet Type 59h — Font String (Packet 02h in WP5.0)

This packet has the same format as Packet Type 07h of the document file format (see the WordPerfect section for more information) except that it contains only the default printer font name.

Packet Type 5Ah — System Initial Codes (Packet 14h in WP5.0)

This variable-length packet is identical to the "Document Initial Codes" packet in the WP5.1 document prefix. It contains function codes as they appear inside a document. This packet is copied to the document setup codes when a new document is created and provides a way to keep the document format consistent between different environments.

Packet Type 5Bh — Reserved

Packet Type 5Ch — Selected Printers List (Packet 1Bh and 1Eh in WP5.0)

This variable-length packet contains the information for all the printers that the user added to the selection list. The format of this packet is a list of fixed-length records of the same structure as packet type 54h, with the exception that it has one 54h formatted entry for each printer on the selection list. The date and time fields are not included in the 5Ch packet entries. Also, each 54h formatted entry in the list does not include the "Date" and "Time" fields.

Packet Type 5Dh — PS Table List

Packet Type 5Eh — Auxiliary Pathnames (Packet 10h for WP5.0)

This fixed-length packet contains the information for the auxiliary pathnames on the Setup key. These fields are fixed length, null terminated and are of the size indicated (pthlen = 67, fnlen = 80).

Offset	Size	Meaning

0	1 word	Length of pathname for printer files

2	67 bytes (0)	Pathname for WP printer files (.PRS and .ALL)

69	1 word	Length of pathname for dictionary/thesaurus/hyphenation

71	67 bytes (0)	Pathname for dictionary/thesaurus/hyphenation

138	1 word	Length of pathname for supplement dictionary

140	67 bytes (0)	Pathname for supplement dictionary

207	1 word	Length of pathname for backup path

209	67 bytes (0)	Pathname for backup path

Note:	In the 10h (WP5.0) packet, both backup fields are used for the thesaurus length and path.

276	1 word	Length of style file pathname

278	80 bytes (0)	Path/filename for style file

Note:	In the 10h (WP5.0) packet, both style fields are used for the backup length and path.

358	1 word	Length of pathname for macros

360	67 bytes (0)	Pathname for macros

Note:	In the 10h (WP5.0) packet, both macro fields are used for the hyphenation dictionary length and path.

427	1 word	Length of pathname for graphics

429	67 bytes (0)	Pathname for graphics

Note:	In the 10h (WP5.0) packet, both graphics fields are used for the styles length and path.

496	1 word	Length of pathname for documents

498	67 bytes (0)	Pathname for documents

Note:	In the 10h (WP5.0) packet, both document fields are used for the key/macro length and path.

Added for WP5.1

Offset	Size	Meaning

565	1 word	Length of pathname for styles

567	67 bytes (0)	Pathname for styles

634	1 word	Length of pathname for spreadsheet files

636	67 bytes (0)	Pathname for spreadsheet files

Appendix B: .WPK Keyboard Macro File Formats

The 16-byte prefix header for .WPK files:

Field	Size	Value for WP5.1 Document

WPCorp File ID	4 bytes	þ1,"WPC"

Start of Document	Double word	File position of start of macro

Product Type	1 byte	1h

File Type	1 byte	3h

Major Version #	1 byte	1h for WP5.1 (0 for WP5.0 .WPK files)

Minor Version #	1 byte	1h for WP5.1 (0 for WP5.0 .WPK files)

Encryption Key	1 word	0h = not encrypted

Reserved	1 word	0h

The special header index is 10 bytes long and has the following structure:

Offset	Size	Usage

0	1 word	Packet type for header index (0FFFBh).

2	1 word	# of indexes (including header). For .WPK files, this # is five, the first four being currently used.

4	1 word	Size of index block (# of indexes * 10).

6	Double word	File position of next index block from beginning of prefix (zero since only one index is needed in a .WPK file).

Other indexes in the index block are also 10 bytes long and have the following structure (the first three indexes following the special header index are currently used in .WPK macros):

Offset	Size	Usage

0	1 word	Packet type

2	Double word	Length of data packet

6	Double word	File position of data type

Packet Type 1:

Single key definitions or tags for multiple keystrokes that contains a hex dump of the key map for all keys.

Note:	"Single keystroke definitions" are the new definition. Multiple keystroke definitions have a high byte of "FDh," and the low byte is the number of the multiple keystroke macro.

Packet Type 2:

Multiple keystroke definitions

First byte = # of multiple keystroke definitions

<Macro #> [Len] {Definition}

Macro #—byte—index into macro table

Len—word—# bytes in macro definition

Macro definition—4K max so you can edit them in WordPerfect

Keyboard Macro Commands Usable in Macro Definition

Note:	Packet Type 3 is only used by WordPerfect to edit keyboard macros and to map file macros to a keyboard macro and vice versa. If the index to Packet 3 is nulled out in the file prefix, keyboard macros will execute, but are not editable in WordPerfect. Nulling out the index to Packet 3 can offer some protection to keyboard macros.

Packet Type 3:

Key Definitions

[Key] [Map Offset] <Desc Length> {Description}

Key—word—key, as defined from IBM keyboard

Map offset—word—offset into keyboard map (Data Packet 1)

Desc Length—byte—does include null at end of description

Description—string—40 characters (includes null at end)

Note:	If the actual description length is less than 40 characters, fill characters are used to fill the remainder of the 40-character description string. Therefore, the description string is always 40 characters long.

Appendix C: Screen Font Files

Introduction

Special files are included with WordPerfect 5.1 to let you display more than 256 characters during normal text mode editing when one of the following screens is present:

EGA (14 points)

VGA (16 points)

Hercules Graphics Card Plus

Hercules InColor Card

There are more than 1500 characters in the WordPerfect master character set (see the WordPerfect Reference manual). Obviously, not all these characters can appear at once on a text screen designed to display 256 or 512 characters. The display adapters listed above let you display 512 or more characters. WordPerfect uses this capability to display additional characters beyond the normal 256 IBM ASCII characters, or to display the first 256 characters in a different attribute.

Note:	In 10/90, WPCorp made available the WordPerfect Screen Font Editor for Text Screen Characters. This product lets you select the characters you want to display from WPCorp character sets in WordPerfect and PlanPerfect text screens. To purchase this product, call (800) 321-4566.

Setup (Shift-F1) contains several menus and options that you can use to display various combinations of characters or attributes on these display adapters. This subsection documents the format of the special files used to implement those characters and attributes. It also describes how to modify them or create new files to display a different set of characters on the screen while WordPerfect is running.

These special character sets and their files apply only to the text mode display listed above. The View Document feature in WordPerfect uses graphics mode and can display all characters that the currently-selected printer supports.

Screen Fonts for EGA and VGA

The IBM EGA, IBM VGA, and compatible display adapters let you display as many as two fonts of 256 characters each. The first set of 256 characters displays the standard IBM ASCII characters. Setup lists several different options for using the second set of 256 characters:

þ	Underlined versions of the first 256 characters can be displayed by the second set of 256 characters. If you choose this option, the EGAUND.FRS file (VGAUND.FRS for VGA) is loaded into font memory and true underlining is available on the EGA or VGA screen.

þ	Italicized versions of the first 256 characters can be displayed by the second set of 256 characters. If you choose this option, the EGAITAL.FRS file (VGAITAL.FRS for VGA) is loaded into font memory and italicized text can appear in text mode.

þ	Small caps versions of the first 256 characters can be displayed by the second set of 256 characters. If you choose this option, the EGASMC.FRS file (VGASMC.FRS for VGA) is loaded into font memory and the small caps attribute can appear in text mode.

þ	The second set of 256 characters can display an additional 256 characters, different from those in the first set. This lets you simultaneously display as many as 512 different characters in text mode. If you choose this option, the EGA512.FRS file (VGA512.FRS for VGA) is loaded into font memory. In addition, WordPerfect attempts to read the EGA512.CHM file (VGA512.CHM for VGA) that contains the character map for the additional 256 characters in EGA512.FRS. If the EGA512.CHM file is not found, the internal character map shipped with WordPerfect is used. The character map tells WordPerfect which of the more than 1500 possible characters are present in the second set of 256 characters.

To display a different set of 256 characters than those shipped in the EGA512.FRS file, redefine the EGA512.FRS file and create an EGA512.CHM file that contains a character map to the new characters.

The format of the EGA512.CHM file is as follows:

Offset	Size	Meaning

0	1 word	# of entries in the map

2	1 word	WordPerfect character # for entry 1 (high byte = set #, low byte = character #)

4	1 word	WordPerfect character # for entry 2

..	..	..

..	..	..

..	1 word	WordPerfect character # for entry N

..	1 word	Index of character to be displayed for entry 1

..	1 word	Index of character to be displayed for entry 2

..	..	..

..	..	..

..	1 word	Index of character to be displayed for entry N

The index of character to be displayed is the index (256..511) of the character in the second font in the display memory. The high byte is 1, and the low byte is the index (0..255) to the character in the display font memory.

Up to 300 entries can be defined in a character map in the EGA512.CHM file. This permits some duplication of characters. For example, you can use the same display font character to display both the Greek pi character and the Math pi character.

A sample assembly language source file for a character map named CHARMAP.ASM (source for EGA512.CHM) is included on the Toolkit diskette. It identifies the WordPerfect characters that are mapped to screen fonts for EGA512.FRS. (The same characters are mapped in the second 256 characters of HRF6.FRS.) You can modify the sample .CHM source as needed to correspond to a new .FRS file that you might create. A batch file, CHM.BAT, is included to aid in creating the .CHM file from the assembly language source file.

The format of the EGA512.FRS file is as follows:

Offset	Size	Meaning

0	14 bytes (16 bytes for VGA)	Screen bitmap for character 0 in second font

14	14 bytes (16 bytes for VGA)	Screen bitmap for character 1 in second font

..	..	..

..	..	..

The 14 bytes correspond to 14 rows (16 rows for VGA, to make 9x16) of a 9x14 character cell. The ninth column of the character is assumed to be blank (or the eighth column is copied to the ninth column for certain Line Draw characters).

Screen Fonts for Hercules Cards

The Hercules Graphics Card Plus and the Hercules InColor Card permit the simultaneous display of up to 12 different screen fonts of 256 characters each. Setup lets you choose one of two options when a Hercules RamFont card is present:

þ	Twelve fonts, 256 characters each. This option displays the normal 256 IBM ASCII characters in 12 different font styles or attributes: normal, double underline, italics, small caps, outline, subscript, superscript, fine print, small print, large print, very large print, and extra large print. The HRF12.FRS file contains these screen fonts and is loaded into the display memory.

þ	Six fonts, 512 characters each. This option displays the normal 256 IBM ASCII characters plus an additional 256 characters from the WordPerfect character set in six different font styles or attributes: normal, italics, superscript, subscript, double underline, and small print. The HRF6.FRS file contains these screen fonts and is loaded into the display memory.

For the second option, to change the characters displayed as the second set of 256, redefine the HRF6.FRS file and create an HRF6.CHM file that contains a character map for the additional characters.

The format of the HRF6.CHM file is the same as that described above the EGA/VGA screen fonts. The format of the HRF6.FRS file is slightly different:

Offset	Size	Meaning

0	16 bytes	Bitmap for character 1, normal

16	16 bytes	Bitmap for character 2, normal

..	..	..

..	..	..

..	16 bytes	Bitmap for character 512, normal

..	16 bytes	Bitmap for character 1, italics

..	16 bytes	Bitmap for character 2, italics

..	..	..

..	..	..

..	16 bytes	Bitmap for character 512, italics

..	16 bytes	Bitmap for character 1, superscript

..	16 bytes	Bitmap for character 2, superscript

..	..	..

..	..	..

..	16 bytes	Bitmap for character 512, superscript

..	16 bytes	Bitmap for character 1, subscript

..	16 bytes	Bitmap for character 2, subscript

..	..	..

..	..	..

..	16 bytes	Bitmap for character 512, subscript

..	16 bytes	Bitmap for character 1, double underline

..	16 bytes	Bitmap for character 2, double underline

..	..	..

..	..	..

..	16 bytes	Bitmap for character 512, double underline

..	16 bytes	Bitmap for character 1, small print

..	16 bytes	Bitmap for character 2, small print

..	..	..

..	..	..

..	16 bytes	Bitmap for character 512, small print

The 16 bytes for each character bitmap correspond to 16 rows of a 9x16 character cell. The ninth column is assumed to be blank (or copied from the eighth column for certain Line Draw characters). You can use the WordPerfect Screen Font Editor to edit or create the bitmaps for .FRS files.

Appendix D: General Font Terms

Appendix E: Hex Chart

[Note that some of the characters will not appear correctly in this representation.]

Hex	Screen	ASCII

Value	Position	Character

01	1	þ

02	2	þ

03	3	þ

04	4	þ

05	5	þ

06	6	þ

07	7	þ

08	8	þ

09	9	þ

0A	10	þ

0B	11	þ

0C	12	þ

0D	13	þ

0E	14	þ

0F	15	þ

10	16	þ

11	17	þ

12	18	þ

13	19	þ

14	20	¶

15	21	§

16	22	þ

17	23	þ

18	24	þ

19	25	þ

1A	26	þ

1B	27	þ

1C	28	þ

1D	29	þ

1E	30	þ

1F	31	þ

20	32	(space)

21	33	!

22	34	"

23	35	#

24	36	$

25	37	%

26	38	&

27	39	'

28	40	(

29	41	)

2A	42	*

2B	43	+

2C	44	,

2D	45	-

Hex	Screen	ASCII

Value	Position	Character

2E	46	.

2F	47	/

30	48	0

31	49	1

32	50	2

33	51	3

34	52	4

35	53	5

36	54	6

37	55	7

38	56	8

39	57	9

3A	58	:

3B	59	;

3C	60	<

3D	61	=

3E	62	>

3F	63	?

40	64	@

41	65	A

42	66	B

43	67	C

44	68	D

45	69	E

46	70	F

47	71	G

48	72	H

49	73	I

4A	74	J

4B	75	K

4C	76	L

4D	77	M

4E	78	N

4F	79	O

50	80	P

51	81	Q

52	82	R

53	83	S

54	84	T

55	85	U

56	86	V

57	87	W

58	88	X

59	89	Y

5A	90	Z

Hex	Screen	ASCII

Value	Position	Character

5B	91	[

5C	92	\

5D	93	]

5E	94	^

5F	95	_

60	96	`

61	97	a

62	98	b

63	99	c

64	100	d

65	101	e

66	102	f

67	103	g

68	104	h

69	105	i

6A	106	j

6B	107	k

6C	108	l

6D	109	m

6E	110	n

6F	111	o

70	112	p

71	113	q

72	114	r

73	115	s

74	116	t

75	117	u

76	118	v

77	119	w

78	120	x

79	121	y

7A	122	z

7B	123	{

7C	124	|

7D	125	}

7E	126	~

7F	127	þ

80	128	Ç

81	129	ü

82	130	é

83	131	â

84	132	ä

85	133	à

86	134	å

87	135	ç

Hex	Screen	ASCII

Value	Position	Character

88	136	ê

89	137	ë

8A	138	è

8B	139	ï

8C	140	î

8D	141	ì

8E	142	Ä

8F	143	Å

90	144	É

91	145	æ

92	146	Æ

93	147	ô

94	148	ö

95	149	ò

96	150	û

97	151	ù

98	152	þ

99	153	Ö

9A	154	Ü

9B	155	¢

9C	156	£

9D	157	¥

9E	158	þ

9F	159	ƒ

A0	160	á

A1	161	í

A2	162	ó

A3	163	ú

A4	164	ñ

A5	165	Ñ

A6	166	ª

A7	167	º

A8	168	¿

A9	169	þ

AA	170

AB	171	½

AC	172	¼

AD	173	¡

AE	174	þ

AF	175	þ

B0	176	þ

B1	177	þ

B2	178	þ

B3	179	þ

B4	180	þ

B5	181	þ

B6	182	þ

B7	183	þ

B8	184	þ

B9	185	þ

BA	186	þ

Hex	Screen	ASCII

Value	Position	Character

BB	187	þ

BC	188	þ

BD	189	þ

BE	190	þ

BF	191	þ

C0	192	þ

C1	193	þ

C2	194	þ

C3	195	þ

C4	196	þ

C5	197	þ

C6	198	þ

C7	199	þ

C8	200	þ

C9	201	þ

CA	202	þ

CB	203	þ

CC	204	þ

CD	205	þ

CE	206	þ

CF	207	þ

D0	208	þ

D1	209	þ

D2	210	þ

D3	211	þ

D4	212	þ

D5	213	þ

D6	214	þ

D7	215	þ

D8	216	þ

D9	217	þ

DA	218	þ

DB	219	þ

DC	220	þ

DD	221	þ

DE	222	þ

DF	223	þ

E0	224	þ

E1	225	ß

E2	226	þ

E3	227	þ

E4	228	þ

E5	229	þ

E6	230

E7	231	þ

E8	232	þ

E9	233	þ

EA	234	þ

EB	235	þ

EC	236	þ

ED	237	þ

Hex	Screen	ASCII

Value	Position	Character

EE	238	þ

EF	239	þ

F0	240	þ

F1	241	±

F2	242	þ

F3	243	þ

F4	244	þ

F5	245	þ

F6	246	÷

F7	247	þ

F8	248	þ

F9	249	þ

FA	250

FB	251	þ

FC	252	þ

FD	253	²

FE	254	þ

FF	255

Index

• • • • • • • • • • • • • • • • • • • • •

INDEX

A

Abbreviated Prefix 21

Advance to page position 56

AFC chaining 118

ASCII Characters 25

Assembly language source files

see Toolkit diskettes

Attribute OFF 30

Attribute ON 30

Auto reference definition 75

Auto reference tag 76

B

Begin marked text 72

Begin style ON 89

Beginning of column (cell) at end

of line 92

Beginning of line 62

Beginning of row at end of line

93

Beginning of row at end of page

97

Beginning of row/hard page

break 97

Block protect 30

Border options 52

Box Group (218 [0xDA] 83

Equation 87

Figure 83

Horizontal line 87

Table 86

Text box 87

User-defined box 87

Vertical line 88

C

Calculator 5

Center/align/tab/left mar rel 28

Character at baseline in fixed line height 57

Character/space width 57

Color 38

Color, DrawPerfect 39

Comment 80

Conditional end of page 80

Constants 41

Conversion rule 102

Create WordPerfect documents

outside of WP 116

D

Date 78

Define

columns 41

link end 50

link start 49

marked text 72

math columns 40

Definition Group (210 [0xD2])

40

define columns 41

define link end 50

define link start 49

define math columns 40

define tables (table on) 47

endnote options 44

footnote options 43

graphics box options for

figures 45

graphics box options for tables

47

graphics box options for text

boxes 47

graphics box options for

user-defined boxes 47

paragraph number definition

42

Different display character when

hyphenated 31

Diskette, Toolkit x Display

control characters 147

Display Group (216 [0xD8]) 78

date function 78

overstrike 79

page number style insert

79

paragraph number 78

Display information for table,

beginning of row codes 66

Document area 22

initial codes 177

summary 11

Document format (WP5.1) 2

Document-specific flags and

information 13

DOS macro file formats 106

E

End marked text 72

End of included subdocument 77

End of indent 31

End of line 62

End of page 61

Endnote 70

Endnote options 44

Endnotes print here 74

End Tag 102

Enhanced merge command codes group (222 [0xDE]) 98

End style ON 90

Entity Reference Off 105

Entity Reference On 105

Equation 86

Equation Nested Function Group

(223 [0xDF]) 101

Extended character 28

F

Fast save 62

Figure 83

File format

macros 190

Fixed-length multi-byte functions

28

attribute OFF 30

attribute ON 30

block protect 30

center align/tab/left margin

release 28

different display character

when hyphenated 31

end of indent 31

extended character 28

indent 29

Font change 28

Font Group (209 [0xD1]) 38

color 38

font change 38

font pattern attributes

(DrawPerfect) 39

Font list 187

Font pattern attributes 39

Font procedure 118

Font (screen) 192

Font string 179, 187, 192

Font terminology 196

Footer A 68

Footer B 68

Footnote 69

Footnote options 43

Footnote/Endnote Group (214

[0xD6]) 69

endnote 70

footnote 69

Force odd/even page 56

Format Group (212 [0xD4]) 61

beginning of line 62

display information for table,

beginning of row codes 67

end of page 61

function to contain non-

editable/displayable text 65

graphics box information 63

invalid function for undo 66

justification information 65

marker for repositioning 64

valid ON marker for undo 65

Function to contain non-

editable/displayable text 65

Functions (WordPerfect)

fixed-length multi-byte 2 8

single-byte 26

variable-length multi-byte 33

G

Generate Group (215 [0xD7])

72

auto reference definition 75

auto reference tag 76

begin marked text 72

define marked text 72

end marked text 72

end of included subdocument

77

endnotes print here 74

include subdocument 76

index entry 73

save page information 74

start of included subdocument

77

table of authority entry 74

VAX path/packetized

filenames 77

Global ON 36

Graphics box information

63

Graphics box options

equations 47

figures 45

tables 47

text boxes 47

user-defined boxes 47

Graphics image data 14

H

Hash value 23

Header A 68

Header B 68

Header/Footer Group (213

[0xD5]) 68

footer A 68

footer B 68

header A 68

header B 68

Hercules screen fonts 181, 192

Hex chart 197

Hide 82

Horizontal line 87

Hyphenation zone set 33

I

Ignore Off 104

Ignore On 104

Include subdocument 76

Indent 29

Index entry 73

Interface, third-party

see UNIX third-party interface Intellitag 34, 37, 67, 102, 104,

105

Invalid Function for Undo 66

J

Justification information 65

K

Kerning 81

Keyboard macro file formats 190

L

Leading adjustment 81

Left/right margin set 33

Line numbering 55

Lotus files, importing 117

M

Macro Commands

UNIX 145

WordPerfect 80, 106

Macro file formats 106, 190

Marker for repositioning 64

Math columns 40

Math operators 41

Miscellaneous group (217

[0xD9]) 80

comment 80

conditional end of page 80

embedded printer command

80

hide function 82

leading adjustment 81

kerning 81

outline on 81

Multi-byte codes 22

Multi-byte functions

fixed-length 28

variable-length 33

O

Old values 22

OLE prefix 19

Outline on 81

Overstrike 19

P

Packets, .SET file 117

Page Format Group (208 [0xD0]) 33

hyphenation zone set 33

justification 34

left/right margin set 33

page number position 33

set line height 33

spacing set 33

suppress page characteristics

33

tab set 33

top/bottom margin set 33

Page number position 33

Page number style insert 79

Paragraph number 78

Paragraph number definition 42

Parameter formats, UNIX tokens 149

Prefix Header (WordPerfect)

additional prefix area 8

data packet types 9

data packets 8

diagram 4

end of prefix data 17

file prefix 4

index block 9, 107

prefix area 4

special header index 8, 107

WP document 17

Printer command, embedded

80

prefix information 17

R

Reverse Polish Notation (RPN)

41

S

.SET file packets 177

Save page information 74

Screen attributes AP-2

font files

Screen fonts

Segment address

alignment character 54

endnote number 55

footnote number 54

graphics box number for

equations 58

graphics box number for

figures 58

graphics box number for tables

58

graphics box number for text

boxes 58

graphics box number for user-

defined boxes 58

Set Group (211 [0xD3]) 54

advance to page position 56

character at baseline in fixed

line height 57

character/space width 57

force odd/even page 56

line numbering 55

set alignment character 54

set endnote number 55

set footnote number 54

set graphics box number for

equations 58

set graphics box number for

figures 58

set graphics box number for

tables 58

set graphics box number for

text boxes 58

set graphics box number for

user-defined boxes 58

set language 59

set page number 55

set page number style 60

set underline mode 54

space expansion 57

Set language 59

Set line height 33

Set page number 55

Set underline mode 54

Single-byte codes 22

Single-byte functions 26

Size definitions 3

Space expansion 57

Spacing set 33

Start of included subdocument

76

Start Tag 102

State flags 127

Style Group (219 [0XDB) 89

begin paired style ON 89

end paired style OFF 89

end style definition 90

open, global style 90

Style OFF 89

Style ON 89

Subdocument

end 77

start 76

Suppress page characteristics

33

T

Tab set 33

Table 86

Table End of Line Codes Group

( 20 [0xDC]) 92

beginning of column (cell) at

end of line 9

beginning of row at end of line

94

table off at end of line 95

Table End of Page Codes Group

(221 [0xDD]) 97

beginning of row at end of page

97

beginning of row/hard page

break 97

table off at end of page 97

Table of authority entry 74

Table off at end of page 97

Tag Group (225 [0xE1]) 102

conversion rule 102

end tag 102

entity reference off 105

entity reference on 105

ignore off 105

ignore on 105

start tag 102

Text box 87

Third-party interface

see UNIX third-party interface

WordPerfect function key

commands 105

WordPerfect key commands 107

Tokens, UNIX 124

Top/bottom margin set 33

U

UNIX macro file formats 106 UNIX third-party interface

detection 123

display control characters 147

extended characters 128

keyboard input handling 125

key codes 128

macro commands 145

normal characters 128

state flags 127

tokens 149

WP function keys 130

WordPerfect key commands

131

Unknown function group 33

User-defined box 87

V

Variable-length multi-byte

functions 33

Box Group (218 [0xDA]) 83

Definition Group (210 [0xD2])

40

Display Group (216 [0xD8])

78

Enhanced Merge Command

Codes (222 [0xDE]) 98

Equation Nested Function

Group (223 [0xDF]) 101

Font Group (209 [0xD1]) 38

Format Group (212 [0xD4])

61

Miscellaneous Group (217

[0xD9]) 80

Page Format Group (208

[0xD0]) 33

Set Group (211 [0xD3]) 54

Style Group (219 [0xDB])

89

Table End of Lines Codes

Group (220 [0xDC]) 92

Table End of Page Codes

Group (221 [0xDD]) 97

Unknown Function Group (254

[0xFE]) 33

VAX macro file formats 106

VAX path/packetized filenames

77

Vertical line 88

W

.WPK keyboard macro file

formats 190

.WPM macro file formats 106

WordPerfect 4.2 detection by 5.0

& 5.1 115

named secondary files 116

WordPerfect 5.1 document

format 2

WordPerfect .SET file packets

117

dialog commands 135

documents, create outside of

WP 116

font procedure 115

WordPerfect for Windows

beginning of line function 62

define dynamic data exchange

link start 51

end of page function 61

font pattern attributes

(DrawPerfect) 39

invalid function for undo 66

justification information 65

macro 82

position of start text 28

table off at end of line 95

table, beginning of row codes

66

valid on marker for undo 66

WPCORP File ID field 5, 106