Atari XL manual Example Macros, Font Set

Page 47

The Last Word 3.0 Reference Manual

7.6 EXAMPLE MACROS

The best way to illustrate the creation of macros is with some useful examples.

DUAL FONT LOADER

When loading fonts into LW, only the font relevant to the current display mode is normally loaded, i.e. if LW is in 80 column mode and you specify a font to load, only the 80 column (.F80) font is loaded, while the 40 column font remains unchanged. You can, however, load the “other” font by specifying the file extender when loading fonts. For example, if LW is in 40 column mode and you load the “MACRO.F80” font, the underlying 80 column font will be loaded while the current 40 column font will remain unchanged.

What if you wanted to load both the 40 and 80 column fonts at the same time? We can write a macro which will function as a new command for loading both types of font.

We’ll put the macro on the <SHIFT+CTRL+O> keystroke, so create an empty file and type <Shift+Esc>, then <Select+ Ctrl+O>. Then type <Shift+Esc>, <Select+=> to get the assignment character. Now we can type the commands which actually make up the macro.

The first thing we want to do is capture the name of the font set to load. We do this using the Macro Ask command. So we type <Shift+Esc>, <Select+Ctrl+A> to get the macro ask character. This is followed by the input prompt we wish to appear on the screen. Type:

Font Set

Press <Return> to end the string. Next, we need to stop the macro issuing keystrokes until the user has a chance to type the name of the font set and press <Return>. This is done with the macro input command, so we type:

<Shift+Esc>, <Select+Ctrl+L>

Now press <Return> - this adds the <Return> which the macro will issue to terminate the user’s input (when the user presses <Return> while the macro is suspended during input, that <Return> is not issued to the input line: it merely tells the macro we have finished entering text. That’s why we have to issue the <Return> character explicitly to terminate text input to the macro ask command.

The string captured by the macro ask command is stored in the paste buffer. It’s stored there because it allows the resulting text to be easily inserted into the document. We can also place the contents of the paste buffer back into the input line of another command, using the <CTRL+B> (Paste Buffer) command. That’s what we’re going to do now: place the font name the user provided into the Load Font command’s input line.

So the next character we need in the macro is <Shift+Esc>, <Select+Ctrl+N>. We then type <Shift+Esc>, <Ctrl+B>, followed by .F80, and finally a <Return>. This simply adds “.F80” to the name the user typed, signifying that we wish to load the 80 column font.

To load the corresponding 40 column font, we type the same line again, except that this time we add “.FNT”.

7-47

Image 47
Contents Last Word Contents Macros Configuring LW for Your PrinterConfiguring LW Programmers Technical Notes LW Command SummaryPrint Formatting Commands DOS Packages and LWOverview of the Last Word IntroductionLoading LW from Spartados About the ManualStarting LW SHIFT+CTRL+W Basic OperationEdit Screen LW LETTER.TXTLast Word 3.0 Reference Manual Filename exists Overwrite / ? Text BanksSaving and Loading Text SHIFT+CTRL+?Last Word 3.0 Reference Manual File Selector Basic ConfigurationCTRL+X Leaving the ProgramText Entry Modes Editor CommandsCursor Movement Delete ord, ine, entence, aragraph? Inserting and Deleting TextMoving and Copying with Text Blocks Hange, ll, To nd, kip? Finding and Replacing TextFind Change to Searching with WildcardsFindTH S Tabulation Additional Editor FeaturesEdited Text Indicator Counting WordsCTRL+B BookmarksText and Document Modes Wildcards Y User OptionsEditing Multiple Files LoadREPORT.DOC/C Handling Large Files2DTHESIS.TXT2 Save AsDREPORT.DOC/ACTRL+J Disk OperationsDisk Operations from the Editor Disk MenuOpy PecIew Vail OckOrmat SHIFT+CTRL+ Down Additional CommandsSubdirectory Features CTRL+HKeeping Track of Pagination Editor Print CommandsPrinting with LW Previewing TextL20r60helloReturn Embedded CommandsStage 1 Commands L20ReturnLast Word 3.0 Reference Manual Set the left margin. The default is Left header/footer margin, default 10. This works like Stage 2 Commands SHIFT+CTRL+SPACE Other Print FeaturesCreating Hanging Indents International CharactersConfiguring the Print Formatter Creating a Printer Driver Configuring LW for Your PrinterPrinter Drivers Init Print TogglesControl Strings Style 1,27,45,8 Style 2,27,83,2 Code 1,129International on 27,82,12 International OFF 27,82,0 Last Word 3.0 Reference Manual Loading Macros MacrosAutorun Macros Running MacrosWriting and Editing Macros Special Macro CommandsField. To actually get input from the user, you Must include Rint Oad AveOad Special Characters Disabling the Screen from MacrosKeyboard Conventions for Macros Entering Other Commands from MacrosSpecial Macro Font Creating and Editing Macros Font Set Example MacrosTranspose Characters Last Word 3.0 Reference Manual Configuration Options in the Editor Configuring LWCFG Configuration Files Drive D1 Default DriveBanks 1,2,3,4 Configuration Using a Supported DOSLW.SYS File Reserve Extpages Configuration Using Other DOS PackagesExtpages Reserve Banked onPath D8D1LW Search PathBanks 5,6,7,8,9,10,11,12 Keyboard Buffer Using Multipe Text BuffersCustom Fonts KEY n,n Customising the KeyboardKeyboard Table Invalid KEY 150,3 Remapping Commands Using MacrosKEY 10,97 3 1200 XL Keys Memlo DOS Packages and LWMemory Requirements Atari DOS XELW TEST.DOC /M% /PD1LW DISK-BASED SpartadosSpartados LW files /Mc /Ppath /Q /XSET LWPATH=D8D1\LW Spartados X Memory ConfigurationsSpartados X Lwpath Environment Variable KEY OFF LW.EXE KEY onLast Word 3.0 Reference Manual Command Function Macro Equivalent LW Command SummaryEditor Commands Ctrl Y See SET CommandSHIFT+CTRL W Inverse Ctrl WKEY Function Special KeysINV CTRL+L Macro CommandsCommand Function INV CtrlDown Arrow Print Formatting CommandsCommand Function Default Value UP ArrowRight Arrow Left ArrowMemory Usage Assembly Language ADD-INSProgrammers Technical Notes SEC Program DesignWHY LW Came Into Being Development and Testing12-74 12-75 Development Correspondence

XL specifications

The Atari XL series, launched in 1982, represented a significant evolution in home computing, building upon the foundation laid by the Atari 400 and 800 systems. This line of computers included popular models such as the Atari 600XL and 800XL, both of which combined affordability with robust capabilities, making them attractive options for home users, educators, and enthusiasts alike.

One of the standout features of the Atari XL series was its color display capabilities. The systems supported a resolution of 320x192 pixels with a vibrant palette of 128 colors, which enabled rich graphics for games and applications. This was complemented by the system's powerful Antic graphics chip that allowed for advanced video display modes, making the Atari XL series particularly popular for gaming and multimedia applications.

Another key technology driving the Atari XL series was its use of the 6502 processor, which delivered efficient performance and allowed for smooth multitasking. The systems typically came with 64KB of RAM, expandable to 128KB, providing ample memory for running multiple applications simultaneously, a notable feature in comparison to other microcomputers of the time.

The Atari XL series also introduced a new, user-friendly operating system known as Atari DOS. This improved disk management capabilities, making it easier for users to manage files and applications on floppy disks. The systems were equipped with built-in BASIC programming language, enabling users to dive into programming and coding, fostering a generation of hobbyists and developers.

Each model in the Atari XL series came with a distinctive keyboard design, offering both a chic and functional layout. The keyboards were known for their tactile feel, making them suitable for typing and coding over extended periods.

Additionally, the Atari XL computers were compatible with a wide range of peripherals, such as printers, modems, and disk drives, enhancing their versatility. Users could also take advantage of a rich library of software, including educational programs, productivity tools, and an ever-growing selection of games.

The Atari XL series not only boasted solid technology and capabilities but also garnered a devoted community. The systems contributed to a vibrant culture of gaming and computing in the early 1980s, which remains fondly remembered by enthusiasts today. With their combination of innovative technology, user-centric design, and a diverse software library, the Atari XL series played a crucial role in the evolution of home computing.