InstantAccess Viewer System Version 4.00 User's Guide Copyright 1994,95 Andr M. Naef. All rights reserved. Table of contents 1 Introduction 1.1 Overview 1.2 About this Manual 1.3 Hardware Requirements 1.4 Quick Start 1.5 Contacting the Author 1.6 Updates 2 Tutorial 2.1 Preparation 2.2 Basic Structure of the Script File 2.3 Adding Text 2.4 Adding Music and Pictures 3 Reference 3.1 Script Language 3.2 Script Compiler 3.3 Setup Menu 4 Palette Maker Service Program 4.1 The VGA Color Palette 4.2 Palette Maker 5 Credits 1. Introduction The InstantAccess Viewer System (later referred as IAVS) is used to make electronic magazines, documents or "books" for PCs. With the IAVS you can quickly create professional-looking, menu-driven text documents. The IAVS will use an adequately formatted text file and transform it into a menu-driven magazine with an interactive table of contents, graphics and music! Use the IAVS to compile your texts and ideas into "electronic books" with an appealing look. Create your personal electronic magazine! The documents you created with the IAVS can be distributed royalty free once you are a registered user. Basic knowledge on using a text editor is all you need to know to get started. 1.1 Overview The core of the InstantAccess Viewer System (IAVS) is the script compiler. This compiler transforms a text file into an executable program. This program is an "electronic book", an IAVS document, which contains the text of the text file and allows the user to read that text in a very comfortable way. The capabilities of the IAVS go far beyond those of a simple text compiler. To mention just a few of its powerful features, the IAVS can ... ... split a text into sections which the reader of the document will be able to access by a clear table of contents ... perform full-text search ... enhance documents with digital music (MOD, S3M) ... add pictures and graphics to documents using a powerful, high-speed compression algorithm Further, the IAVS allows you to ... ... freely select the colors of your documents ... compile a lot of small text files into one central document with a table of contents ... subdivide the main menu of a document into sub menus ... and a lot more. The IAVS is available in an English and in a German version. 1.2 About this Manual This manual essentially consists of two parts: A tutorial which is a step-by-step guide to the creation of IAVS documents, and a reference part that describes the script language of the IAVS. An additional part of this manual contains the description of the Palette Maker service program. If you haven't worked with the IAVS yet, it is recommended that you read the tutorial first. The tutorial gives you a good overview on the capabilities of the IAVS and explains the software in a way that is easy to understand. 1.3 Hardware Requirements To work with the IAVS, you need a 386SX or higher processor. Your computer must be equipped with at least 1 MByte of extended memory (XMS) and with a VGA display adapter. To use advanced features of the IAVS (like Super-VGA graphics and digital music), you need additional hardware: To display Super-VGA graphics, you need a Super-VGA card with a VESA Video BIOS Extension (VBE). The VBE is already installed on most VGA cards produced during the past few years. If your Super-VGA card doesn't have a VBE, you can install a VESA driver which, in general, is part of the software that comes with your display adapter. A VESA driver adds a VBE to your Super-VGA card, thus allowing the IAVS to use Super-VGA. To play digital music with the IAVS, you need a sound card. The IAVS supports Sound Blaster, Sound Blaster Pro, Sound Blaster 16, Sound Blaster AWE32, Gravis Ultrasound, Gravis Ultrasound Max and any sound card that is 100% compatible to any of the sound cards listed above. 1.4 Quick Start Please read the file LICENSE.TXT which contains the IAVS license agreement and other legal information if you haven't done so already. Usage of the IAVS requires agreement with the terms written in LICENSE.TXT. Before you continue reading this manual, I suggest that you have a look at a finished IAVS document. If you like that document and you want to create similar documents or magazines yourself, you can continue reading this manual, which will guide you step-by-step through the creation of the document you have just seen. To create the sample document, enter the command MAKE at the DOS prompt and press the [Return] key. The IAVS script compiler is invoked and creates the sample document. After compiling, which will take a few seconds, the document is started. The sample document will give you a good overview on the capabilities of the IAVS. 1.5 Contacting the Author Should you encounter any problem while working with the IAVS or if you have questions or want to suggest something, feel free to contact the author. He can be reached at the following addresses: Internet................ anaef@squirrel.ch CompuServe.............. 100270,2426 Postal address.......... Andr M. Naef, Rychenbergstrasse 9, 8400 Winterthur, Switzerland Andr M. Naef uses PGP. -----BEGIN PGP PUBLIC KEY BLOCK----- Version: 2.6.2i mQBtAy6JuZUAAAEDALzqiXOI7Axn+iU+N7fqkVHVAjbUlYRhPtmsz1f+gcITpm5A hzTyEKLymfE8trFA7Xz6adEwHLZkyv5vuzCGv+Zwp88WGhW+oLhlv5ujTT2XNXVx 50vd5w3ZV7bKwO40ZQAFEbQhQW5kcmUgTS4gTmFlZiA8YW5hZWZAc3F1aXJyZWwu Y2g+ =qvjc -----END PGP PUBLIC KEY BLOCK----- 1.6 Updates You should be able to get updates of the IAVS from the site you got the current version. If you can't find the update there, the most current version of the IAVS is always available at the following sites: PC Applications Forum on CompuServe (GO PCAPP) Somy BBS, Wohlen AG, Switzerland Data phone: ++41 (0)57 23 1945 (ZyXEL) ++41 (0)57 23 1351 (USRobotics) Squirrel BBS, Brtten ZH, Switzerland Data phone: ++41 (0)52 33 3050 (USRobotics) ++41 (0)52 33 3033 (ZyXEL) SimTel Software Repository on the Internet Detroit, USA: ftp.coast.net (205.137.48.28) /SimTel/msdos Australia: archie.au (139.130.4.6) /micros/pc/SimTel/msdos Lancaster, England: micros.hensa.ac.uk (148.88.8.84) /mirrors/simtel/msdos Tuebingen, Germany: ftp.uni-tuebingen.de (134.2.2.60) /pub/simtel/msdos Hong Kong: ftp.cs.cuhk.hk (137.189.4.57) /pub/simtel/msdos Switzerland: ftp.switch.ch (130.59.1.40) /mirror/simtel/msdos Rochester, MI. USA: OAK.Oakland.Edu /SimTel/msdos ... and on other FTP sites that mirror the SimTel MS-DOS collection If you register the IAVS, you will receive a personal electronic key (the file IAVS.KEY) which promotes the shareware version of the IAVS to the fully-functional registered version. With that key you will also be able to use update versions as fully-functional registered versions. There will be no additional charges for updates once you have registered the IAVS. 2. Tutorial This tutorial will show you how you can use the IAVS to create professional- looking documents with little effort. The tutorial will guide you step-by-step through the process. The IAVS document you are going to create in this tutorial is included with the sample files of the IAVS. The filename is PCGRAPH.TXT. If you have followed the instructions under 1.4 (Quick Start), you have already seen the final version of that document. I recommend you to have a look at the final document before you begin with the tutorial. If you know what the final product is like, it will be much easier for you to follow the steps described in the tutorial. 2.1 Preparation Every IAVS document is based on a script file. A script file is a plain PC ASCII text file that contains the text that will appear in the document. Furthermore, the script file contains formatting information, links to pictures that are added to the document, etc. The script file is the central piece of an IAVS document. Probably you have already noticed that you will need an editor to work on the script file in addition to the IAVS. Every DOS-based text editor is suitable for this job. You can also use your favorite word processor, IF you know how to create plain PC ASCII text files without formatting information with your word processor. Windows-based editors are not recommended since the character set used in Windows differs from the one used in DOS. If you haven't chosen a favorite text editor yet, I'd like to point out the MS-DOS Editor. This editor is part of your DOS operating system and can be found as EDIT.EXE in the DOS directory of your computer. 2.2 Basic Structure of the Script File During this tutorial we will create an IAVS document that gives an overview on the PC graphics standards. This overview covers the time from the introduction of the first IBM PC up to today. Our script file is named PCGRAPH.TXT and can be found under this name among the sample files of the IAVS. The script file begins with this text: --- ; An overview on the PC graphics standards ; IAVS script created on 1.5.1995 ; Last updated on 7.5.1995 .TITLE The PC Graphics Standards .TITLE An Overview from CGA to Super-VGA .TITLE Created using the ~InstantAccess~ Viewer System --- What's the meaning of these lines? Let's have a look at them line-by-line. The first three lines begin with a semicolon (;). This semicolon marks the lines as comments. Comments are skipped by the script compiler when it encounters them. Using comments you can add notes to your script files that will not appear in the final document. Following the three comment lines is an empty line. This empty line can be there or not. It doesn't make any difference. Empty lines are skipped by the compiler in the same way as comments if they are not part of an article (more on this later.) The next three lines begin with a dot. They contain script compiler commands. As a general rule, all script compiler commands begin with a dot. The command .TITLE notifies the script compiler that the text which follows is to be treated as the title of the document. As you can see the .TITLE command is used more than once. Thus, more than one title is defined. The main menu of the document will always show just one title at a time, but will replace it by the next title in a 5-seconds interval. Titles are displayed in the order they were defined in the script file. After the last title has been displayed, the procedure will start anew by displaying the first title again. "And what about those funny tildes (~) in the third .TITLE line?" you might ask. Good observation. These tildes are "switches" that instruct the script compiler to switch into emphasizing mode, or quit emphasizing mode if it has been enabled before. In the third title line the tildes are used to emphasize the expression "InstantAccess". The first tilde enables the emphasizing mode, the second one disables it. Expressions that are emphasized in this way appear with a special color attribute in the final document. Now, we will add a title picture to our document. To do this, we will need a new script compiler command. The command we are going to use is .CPIC (for "cover picture"). This command can be issued anywhere within the script file: --- .CPIC COVER.PCX --- The .CPIC command followed by the filename of a PCX file determines the graphic that appears as the cover picture of the final document. The cover picture is displayed whenever an IAVS document is started. By adding the .CPIC command we have completed the basic structure of our IAVS document. The script file looks like this now: --- ; An overview on the PC graphics standards ; IAVS script created on 1.5.1995 ; Last updated on 7.5.1995 .TITLE The PC Graphics Standards .TITLE An Overview from CGA to Super-VGA .TITLE Created using the ~InstantAccess~ Viewer System .CPIC COVER.PCX --- 2.3 Adding Text We have defined the basic structure of our script file in the previous step and are now going to add the text that will appear in the document. While adding the text we will use the IAVS functions to format and subdivide the text. Let's begin with the introduction text of our document: --- .ART Introduction Hi! ... and welcome to a brief overview on the PC graphics standards. This document contains information on the following display adapters: Monochrome Display Adapter (MDA) Color Graphics Adapter (CGA) Hercules Graphics Card (HGC) Enhanced Graphics Adapter (EGA) Video Graphics Array (VGA) Super-VGA --- The most important line in this part of the script file is the first line. The command .ART in the first line introduces a new ARTicle. The command .ART is followed by the title that will appear in the main menu of the document to represent the article. So, the part of the script that is shown above first "tells" the script compiler that a new article with the title "Introduction" is to be created. The script compiler will then interpret all lines following the .ART command as the text of the article. Now let's add facts about the display adapters to the document. In order to do this, we will first create a sub menu with the title "Monochrome Display Adapters". This sub menu will contain the articles on the two monochrome graphics standards MDA and HGC. In the IAVS, a sub menu is created by the .SUB command. --- .SUB Monochrome Display Adapters .ART Monochrome Display Adapter .M1 ~The ~Monochrome Display Adapter~ (MDA) was introduced back in 1981 when the first IBM PC was presented to the public. The capabilities of the MDA aren't very impressive in comparison to VGA and Super-VGA cards that are common nowadays. Monochrome text with 25 lines and 80 columns is all the MDA is capable of. .ART Hercules Graphics Card .M1 ~The ~Hercules Graphics Card~ (HGC) was released one year after the introduction of the IBM PC. The manufacturer of this card was not IBM but a company named Hercules. The HGC is completely compatible with IBM's MDA but exceeds it in features: The HGC can display monochrome graphics with a resolution of 720x348 dots. This feature ensured the HGC and its numerous clones a long period of success. .ENDSUB --- What's the meaning of these lines? Again, we will go through the script line by line. In the first line a sub menu with the title "Monochrome Display Adapters" is created. This sub menu will appear in the main menu of the final document. After that, a new article is introduced in the same way as in the introductory text of the document. The command in the first line of this article is new. The .M1 command emphasizes a single line of text with a special color. The "M" means "mark". After we have started emphasizing using the .M1 command, we disable it right away with the first tilde since we do not want the first word in the line ("The") to be emphasized. The second tilde in front of the expression "Monochrome Display Adapters" re-enables the emphasizing mode. After the last word of that expression we use the tilde for the third and last time to disable the emphasizing mode again. As a result of our work, the expression "Monochrome Display Adapters" will appear in a special foreground color in the final document. Beside the .M1 command, the IAVS also accepts the .M2, .M3 and .M4 commands which work in the same way as the .M1 command but use a different color for emphasizing. Command Color .M1 White .M2 Light green .M3 Light red .M4 Cyan The last subject we should talk about with reference to the script shown above is the .ENDSUB command that is right at the end of the script. The .ENDSUB command closes a sub menu that has been previously opened by a .SUB command. In our case, the sub menu being closed is the one with the title "Monochrome Display Adapters". The .ENDSUB command may seem superfluous at the first glance, but its importance will increase if more than one sub menu or sub menus that contain sub menus of their own are created. In the next step we will add text about the color display adapters to our document. To do this, we will of course open a new sub menu using the .SUB command. But how can the compiler know whether the new sub menu is a sub menu in the sub menu on monochrome display adapters or whether it is a sub menu in the main menu? The solution to this problem is the .ENDSUB command. This command closes the sub menu on monochrome display adapters and gets us "one step up" in the hierarchy of menus, back to the menu which is the "owner" of the sub menu we just closed using the .ENDSUB command. In our case, this is the main menu since the sub menu on monochrome display adapters was created within the main menu, thus making the main menu its "owner". When we add an article or a sub menu using the .ART or the .SUB command, that article will now appear in the main menu and not in the sub menu on monochrome display adapters. Now, let's add the text about the color display adapters: --- .SUB Color Display Adapters .ART Color Graphics Adapter .M1 ~The ~Color Graphics Adapter~ (CGA) was introduced by IBM at the same time as the Monochrome Display Adapter (MDA), back in 1981 when the first IBM PC was presented to the public. The CGA display adapter features the same text mode as the MDA card, namely 25 lines by 80 columns. The difference between the CGA card and the MDA card is that the CGA card can display that text mode with 16 colors. The price that had to be paid for the color display capability of the CGA card is a dot matrix resolution that is much lower than the resolution of an MDA card. The lower text resolution also affects the graphics resolution of the CGA card. The CGA card features two graphics modes: 320x200 with 4 colors and 620x200 with 2 colors. Both resolutions are lower than the resolution of the HGC card. .ART Enhanced Graphics Adapter .M1 ~The ~Enhanced Graphics Adapter~ (EGA) was released in 1985 and was a technological break-through in comparison to the CGA card: Thanks to a higher display resolution the quality of the character dot matrix on the EGA display almost reaches the quality of an MDA card. The graphics resolutions include a new high-resolution mode with 640x350 dots in addition to the old 320x200 and 640x200 modes. All modes can be displayed with 16 colors. .ART Video Graphics Array .M1 ~The ~Video Graphics Array~ (VGA) was introduced in 1987 at the same time as IBM's first PS/2 computers. VGA succeeded in further improving the EGA technology. The most important changes in comparison to EGA are: Graphics mode 320x200 with 256 colors Graphics mode 640x480 with 16 colors Changeover from digital to analog display signals Free color-selection from a palette consisting of over 256'000 colors .ART Super-VGA .M1 ~The term ~Super-VGA~ comprises all display adapters with features that go beyond the VGA standard. Common Super-VGA graphics modes are: 640x480 800x600 1024x768 1280x1024 (with 256, 32768, 65536 or 16.7 million colors each) The main problem with this new magnificence of colors and resolutions was that there was no standard on how the new modes were to be implemented. However, .M1 ~this problem was recognized and led to the foundation of the ~Video .M1 Electronic Standard Association~ (VESA). Soon after the VESA had been founded, it published a standard which would be known as the Video BIOS Extension (VBE) or just as the VESA standard. The VESA standard defined a uniform system (a so called interface) by which programs are able to access the Super-VGA modes on any VESA compliant Super-VGA display adapter. .ENDSUB --- Voil. We did it: the text of our document is complete. In this part of the script, we used no new commands. We just applied techniques that have been introduced earlier. The menu structure of our document now looks like this: Main Menu Introduction Monochrome Display Adapters Monochrome Display Adapter Hercules Graphics Card Color Display Adapters Color Graphics Adapter Enhanced Graphics Adapter Video Graphics Array Super-VGA We have used the .ART command to create new articles. By using the .SUB command we have opened sub menus which have later been closed by the .ENDSUB command. These three commands allow the creation of orderly menu structures with little effort. A text which has been structured in this way is clearer and more straight-forward than a text that is written "in one piece". As a result of the structuring process the reader of the document will be able to orientate himself faster and he will have quicker access to the single articles. Soon we will reach the end of the tutorial. In the final step we will do some "window-dressing" work on our document. 2.4 Adding Music and Pictures The text and the menu structure of our document have been completed in the previous part of the tutorial. Before we move on to compiling our "masterpiece", we will add some background music and some pictures. With the powerful import functions of the IAVS these two things can be done quickly and with little effort. We have already used the picture import function at the beginning of the tutorial when we defined the cover picture of our document. This time, we will not define a cover picture, instead we will add pictures to the articles on the CGA and the VGA display adapters. For this job, we will use the .PIC command of the IAVS. The .PIC command, followed by the filename of a PCX graphics file, adds that picture to the current article. "Current" in this case refers to the article which has been opened previous to the .PIC command in the script file. We will modify the script file like this: --- .SUB Color Display Adapters .ART Color Graphics Adapter .PIC CGA.PCX .M1 ~The ~Color Graphics Adapter~ (CGA) was introduced by IBM at the same . . . .ART Video Graphics Array .PIC VGA.PCX .M1 ~The ~Video Graphics Array~ (VGA) was introduced in 1987 at the same . . . --- And that's it! Whenever the articles on the CGA or on the VGA display adapter are read, a notice saying "F10 Picture" will appear on the right end of the status line. If the reader presses [F10] or clicks on "F10 Picture" with the mouse, the corresponding picture will be displayed. Of course, the .PIC command can be used more than once within an article in order to add more than one picture to an article. The .PIC commands don't have to follow the .ART command immediately, but if they are positioned at that place, the structure of the script file remains clear. Now comes the final step: we will add music to our document. The IAVS supports the two digital music formats MOD and S3M. You can find MOD and S3M music files on numerous BBS's or on wide-spread CD-ROMs which exclusively contain MOD and/or S3M music files. By using appropriate software you can even produce MOD or S3M music files yourself. There is a MOD file named PCGRAPH.MOD among the sample files of the IAVS. We are now going to add that file to our document. To do this, we use the .DSM command followed by the filename of the MOD or S3M music file. DSM means "Digital Sound Module". We can place the .DSM command anywhere within the script file. However, in order to keep the script file orderly, we select a position right at the beginning. --- ; An overview on the PC graphics standards ; IAVS script created on 1.5.1995 ; Last updated on 7.5.1995 .TITLE The PC Graphics Standards .TITLE An Overview from CGA to Super-VGA .TITLE Created using the ~InstantAccess~ Viewer System .DSM PCGRAPH.MOD --- We did it! Our script file is finished and is ready to be compiled. The compiler will create an executable EXE file based on our script. The complete script file from the tutorial is named PCGRAPH.TXT and is included with the sample files of the IAVS. We will now compile that script. To do so, we start the script compiler by typing IAVSSC PCGRAPH.TXT at the DOS command line. The compiling process only takes a few seconds. After a successful compilation, you will find the files PCGRAPH.EXE, PCGRAPH.GFX and PCGRAPH.SFX in the current directory. PCGRAPH.EXE is the main program of the electronic document we just created. This file also contains the text of all the articles. PCGRAPH.GFX contains the pictures and graphics of the document and PCGRAPH.SFX contains the digital sound module. Start PCGRAPH.EXE. A setup menu will appear allowing you to customize the document's sound card settings. Select "Save and Start" when you are done. The main menu of the document will appear. Congratulations! You have just created your first IAVS document and started it successfully. You may want to try out the following things now... Use the keyboard or the mouse to scroll through the menus Open and read the articles View the embedded pictures Check out the full-text search option ([F5]) Print or export articles ([Alt+E], [Alt+P]) Adjust the sound volume ([Alt+V], [Alt+S]) ... When you press [F1], a help text will appear that lists and describes the commands currently available. 3. Reference The reference part of this manual completely describes the script language of the IAVS. Moreover, you can find details on the script compiler and on the setup menu here. 3.1 Script Language The following section contains a detailed discussion of all IAVS script language commands. 3.1.1 .ART command Syntax: .ART
The .ART command introduces a new article. The parameter passed as
will appear in the current sub menu to represent the article. If no sub menu is currently open, the headline will appear in the main menu. The lines following the .ART command are interpreted as the text of the article. The text range of an article ends if a new article is begun (.ART command), if a sub menu is opened or closed (.SUB and .ENDSUB commands) or if the end of the script file is reached. Example: .ART General Information See also: .SUB command, .ENDSUB command, comments 3.1.2 .CMSG command Syntax: .CMSG The .CMSG command ("Creator Message") allows to add a copyright notice or a notice of origin to articles when they are exported from a document. The text passed as will be copied to the end of every article that is exported from the document. The text will not be added if an article is printed. The .CMSG command can be used more than once to define a creator message consisting of multiple lines. Example: .CMSG This article is Copyright (C) 1995 by XY. .CMSG Not to be distributed without this notice. 3.1.3 .CPIC command Syntax: .CPIC The .CPIC command selects the PCX graphics file as the cover picture of a document. The cover picture is displayed whenever a IAVS document is started. If a script file does not contain a .CPIC command, the IAVS compiler generates a document without a cover picture. Example: .CPIC c:\data\images\cover.pcx 3.1.4 .DSM command Syntax: .DSM The .DSM command ("Digital Sound Module") determines what piece of music is played when the final IAVS document is being read. The filename of a MOD or S3M digital music file is passed as the parameter. If a script file does not contain a .DSM command, the IAVS script compiler generates a document with no sound module. In this case, the sound card setup menu will not appear when the document is started. Limitations: Due to technical reasons the size of a sound module cannot exceed 200 KBytes. Example: .DSM c:\data\sound\classic.s3m 3.1.5 .ENDSUB command Syntax: .ENDSUB The .ENDSUB command closes the sub menu that has been opened last. Example: .SUB Sub menu 1 .ART Article 1 [Text] .ART Article 2 [Text] .SUB Sub menu 2 .ART Article 3 [Text] .ART Article 4 [Text] .ENDSUB .ART Article 5 [Text] .ENDSUB .ART Article 6 [Text] This script results in the following menu tree: Main menu Sub menu 2 Ŀ Ŀ Sub menu 1 > Article 1 Sub menu 2 Article 6 Article 2 Ŀ Sub menu 2 > Article 4 Article 5 Article 5 3.1.6 .Mx command Syntax: .Mx The .Mx command emphasizes a line of text with a special color attribute. For 'x' the numbers 1, 2, 3 or 4 are to be specified. Command Color .M1 White .M2 Light green .M3 Light red .M4 Cyan Within the part of the emphasized line the tilde (~) can be used to deactivate the emphasizing mode. After its deactivation the emphasizing mode can be re-enabled by another tilde. Examples: .M1 This line is completely emphasized. .M1 Only~ the first word of this line is emphasized. .M1 ~Only that last word of this line is ~emphasized. .M2 The~ first and the last word of this line are ~emphasized. 3.1.7 .PALxx command Syntax: .PALxx The .PALxx command modifies one of the 16 color palette entries of a IAVS document. For xx 0, 1, 2, ..., 14, 15 is to be specified. For three numerical values in the range of 0..63 are to be specified. These three values determine the red, green and blue parts of the color. The .PALxx command is described in chapter 4 of this manual at great length. Example: .PAL1 40 40 40 .PAL6 0 0 0 .PAL8 63 63 42 .PAL15 63 63 63 3.1.8 .PIC command Syntax: .PIC The .PIC command adds a picture to the current article. For the filename (and, if necessary, the path) of a PCX file is to be specified. In the final document, the picture can be viewed by pressing [F10] when the article is on screen. A notice saying "F10 Picture" will appear in the status line to point out the presence of pictures. .PIC can be used only within the text block of an article, which is to say, it must be preceded by an .ART command. .PIC can be used multiple times to add multiple pictures to an article. The order by which the pictures are displayed is determined by the order of the .ART commands in the script file. Example: .PIC drawing.pcx .PIC c:\data\images\overview.pcx 3.1.9 .SUB command Syntax: .SUB The .SUB command adds a sub menu with the caption to the document. A sub menu, like the main menu, can contain articles or additional sub menus. Example: see .ENDSUB command See also: .ART command, .ENDSUB command 3.1.10 .TITLE command Syntax: .TITLE The .TITLE command adds a caption to the IAVS document where <title> is the text of the caption. Within the title text, the tilde (~) can be used to switch from the default text color to an emphasizing text color. If the emphasizing mode is active, it can be disabled by another tilde. Example: .TITLE ~Welcome~ to this Electronic Document! 3.1.11 Comments Syntax: ; <comment> Lines beginning with a semicolon (;) are comments. The script compiler ignores comments when it encounters them. Comments are ideal to add remarks that are not supposed to appear in the final document. 3.2 Script Compiler The script compiler transforms a IAVS script file into a IAVS document. 3.2.1 Parameters The IAVS script compiler uses just one parameter: the name of the script file. Syntax: IAVSSC <script file> Example: IAVSSC mydoc.txt 3.2.2 Parts of a IAVS Document Following the successful compilation of a script file, an executable file will be generated with the same name as the script file but with the extension .EXE. This EXE file is always created. It contains (beside the program code of the viewer) the complete text, the menus, the headlines and the cover picture of the document. If the .PIC command is used within a script file to add pictures to articles, the script compiler also creates a GFX (Graphical FX) file that contains all pictures (beside the cover picture) of the document. If the .DSM command is used within a script file to add digital music to a document, the script compiler also creates a SFX (Sound FX) file that contains the digital sound module. Both the GFX and the SFX file have the same name as the script file but with the extensions .GFX and .SFX respectively. The distribution of the document data on several files makes perfect sense since electronic documents like the ones created with the IAVS script compiler are often spread by telecommunication. Thanks to subdivision of the data on three separate files, the reader of the document is free to download just the main executable which is fully functional even if the GFX and/or SFX files are not present. If the GFX file is absent, the notice saying "F10 Picture" will not appear in the status line and pressing [F10] is ignored. If the SFX file is absent, no background music is played when the document is read. 3.2.3 Error and Warning Messages If the script compiler encounters a problem when processing a script file, it issues an error or warning message. The meaning of these messages is discussed in the following section. A warning message always contains the number of the line that caused the warning. The compiler continues with the processing of the script file after it has displayed a warning message and it also creates the EXE, GFX and SFX files whenever possible. 3.2.3.1 Error Messages Not enough information to build executable A script file must contain at least one article that is declared by an .ART command. If this condition is not met, the compiler cannot create an EXE file. File not found: <filename> The script file name passed in the command line is invalid. Probably the script file is not in the current directory and its filename must be completed with path and drive ID. 3.2.3.2 Warning Messages Invalid PALxx statement; line used as text The command .PALxx was specified, but one of the four parameters was found to be out of range. xx must be a value between 0 and 15, the three parameters for red, green and blue must be in the range of 0..63. See chapter four for more information on the PALxx statement. Unknown script command; line used as text A line within the script file begins with a dot that is not followed by a valid command designator. The line was interpreted as text. Perhaps this warning message is displayed unnecessarily because the line in question indeed begins with a dot but is not a command. On the other hand, a typo in the command designator may be causing this error message. Line contains text but is not part of an article The compiler encountered a line of text that was not positioned within the text block of an article. Because the compiler was unable to assign the text to an article, the line was ignored. ENDSUB: no sub menu to close The script file contains an .ENDSUB command at a position where no sub menus are open. The .ENDSUB command was ignored. CPIC: cover picture already specified The script file contains the .CPIC command more than once. Since there can be only one cover picture for a single document, all .CPIC commands beside the first one are ignored. [ The following warning messages for the .PIC command may also appear in connection with the .CPIC command. Instead of "PIC" the expression "CPIC" appears in the warning message in that case. ] PIC: <file> was not found The filename specified is invalid. Probably there is a typo in the filename, or the file is located in an other directory than the current one. If the latter is true, the filename must be completed with path and drive ID. PIC: <file> has invalid format The file specified is not a PCX file, or it is a 24-Bit TrueColor PCX file. Graphics file formats other than PCX are not supported by the IAVS; 24-Bit TrueColor PCX graphics are not supported in this release of the IAVS. PIC: no file specified A .PIC command in the script file is not followed by a filename. The .PIC command was ignored. PIC: command used outside of an article; PIC ignored A .PIC command in the script file is not positioned within the text block of an article, that is to say, it doesn't succeed a .ART command. Since the picture cannot be assigned to an article, the .PIC command is ignored. DSM: sound module already specified The script file contains the .DSM command more than once. Since there can be only one digital sound module per IAVS document, all .DSM commands beside the first one are ignored. DSM: <file> was not found The filename specified is invalid. Probably there is a typo in the filename, or the file is located in an other directory than the current one. If the latter is true, the filename must be completed with path and drive ID. DSM: file too large; 200 KBytes (204800 Bytes) size limit The DSM file is too large. For technical reasons MOD or S3M digital sound modules cannot exceed 200 KBytes in size. DSM: no file specified There is a .DSM command in the script file that is not followed by a filename. The .DSM command was ignored. 3.3 Setup Menu If (and only if) a IAVS document contains a digital sound module, a setup menu will appear when the document is run for the first time. In the setup menu, some choices can be made regarding the sound card used for music playback. These choices are: Type of sound card: the IAVS supports all Sound Blaster and Ultrasound cards Port address of the sound card IRQ line of the sound card DMA channel of the sound card Mixing frequency: High mixing frequencies increase sound quality but also CPU usage. The option is omitted for the Gravis Ultrasound. When setup is complete, the IAVS document can be started by selecting the menu item "Save and Start". The choices made in the setup menu are saved so that the setup needn't be re-run when the document is started the next time. If you want to re-run the setup, you can force an IAVS document to enter setup mode by starting the document with the command line parameter "-c". If an IAVS document is supposed to be read on other computers than its creator's computer, it is strongly recommended that the document is NOT started before it is given away. This is the only way to ensure that the setup menu will appear and ask the reader for his sound card settings when the document is started on the reader's computer for the first time This is particularly important since sound card settings vary from one computer to the other even for the same sound card model. Presettings made by the creator of a document would probably cause the document to lock up on the readers' computers. 4. Palette Maker Service Program It is possible to customize the colors of a IAVS document. To do this, a color palette needs to be created. The Palette Maker (PalMaker) service program facilitates the creation of an individual color palette. This chapter contains some basic information on the VGA palette and describes the PalMaker service program. 4.1 The VGA Color Palette The IAVS operates in a 16-color text mode. "16-color text mode" means that there is a maximum of 16 colors at the disposal of the IAVS. These 16 colors can be chosen freely from a palette consisting of over 256'000 colors. The basis for the definition of colors is the RGB (red-green-blue) color system. In the RGB color system every color is defined as the sum of its red, green and blue parts. The range for the red, green and blue parts is between 0 and 63. 0 means weakest intensity while 63 means brightest intensity. Some examples ... Color Red Green Blue Black 0 0 0 Blue 0 0 42 Green 0 42 0 Cyan 0 42 42 Red 42 0 0 Magenta 42 0 42 Brown 42 42 0 Light gray 42 42 42 Dark gray 21 21 21 Light blue 21 21 63 Light green 21 63 21 Light cyan 21 63 63 Light red 63 42 42 Light magenta 63 21 63 Yellow 63 63 21 White 63 63 63 4.2 Palette Maker The 16 colors a IAVS document is displayed with can be specified in the script file of the document by a series of .PALxx commands. For xx, a value in the range from 0 to 15 is specified that designates the palette entry the .PALxx command is related to. The .PALxx command is followed by three values in the range from 0 to 63 that determine the red, green and blue parts (in this order) of the new color. Examples: .PAL2 63 63 63 (defines color 2 as white) .PAL15 0 0 0 (defines color 15 as black) .PAL7 63 42 42 (defines color 7 as light red) It would be quite a laborious task to create a new color palette in this way, because the result of a change in the color definition would only be visible after compiling the script file. This is where PalMaker comes into use. After starting PalMaker by typing PALMAKER a IAVS document that looks pretty normal at the first glance appears. The special feature of this IAVS document is the [F2] key. After pressing [F2] a palette editor appears that allows changes to the color settings which will take effect immediately. In the palette editor which is activated by pressing [F2], there are 16 rows for the 16 colors of the text mode. Each row contains three fields for the red, green and blue parts of its color. As soon as the palette editor is closed either by pressing [Return] or by clicking the [OK] button with the mouse, the changes take effect and the PalMaker looks like a IAVS document created with the very color settings specified in the palette editor. By pressing [F2] again, the palette editor can then be re-opened to apply further changes to the color palette. If the color palette has the desired appearance, you can write it to disk by selecting the [Save] button in the palette editor window. PalMaker writes the palette settings into a file named PAL.TXT. PAL.TXT contains the 16 .PALxx commands that exactly describe the palette defined in the PalMaker. PAL.TXT can then be copied into a script file and the document that is based on that script file will immediately appear with the colors palette defined in the PalMaker. The last question that needs to be resolved is what elements of a IAVS document get their color attribute from which palette entry. The following table offers an overview: Palette entry Element(s) 00 background of the status line on the text viewer screen 01 background of the text viewer 02 text color of the title bar (normal), attribute M1 of the text viewer 03 text color of the title bar (emphasized), attribute M2 of the text viewer 04 attribute M3 of the text viewer 05 default text color of the text viewer 06 attribute M4 of the text viewer, selection bar of the main menu, background of the help windows 07 background color of the main menu and all other dialogs 08 - 09 color 1 of the background mosaic 10 color 2 of the background mosaic, background of the status line on the main menu screen 11 color 3 of the background mosaic, background of the title bar on the main menu screen 12 color 4 of the background mosaic 13 text color of the shortcut keys in the status line 14 color of the window frames 15 color of the mouse cursor, text color of the status line items It becomes obvious that changes applied to a single palette entry may have side effects since most of the 16 color entries determine the color of more than one element of a IAVS document. The limitations of the VGA text mode on the one hand and special effects the IAVS produces with the VGA card on the other hand make these side effects inevitable. 5. Credits The author wishes to thank Gaetano Calia and Markus Winkelmann for the excellent input they offered during the development of this product. Their ideas characterize the IAVS at great length. Special thanks go out to Gaetano Calia for his editing work on the manual. Thank you very much! Andr M. Naef, July 1995 [===========================================================================] All the registered trademarks used herein are registered to whoever it is that owns them. This notification is given in lieu of any specific list of trade- marks and their owners. ============================================================================= [ >>>>>>>>>>>>>>>>>>>>>>>>>> END OF DOCUMENT <<<<<<<<<<<<<<<<<<<<<<<<<< ] =============================================================================