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

Page 47
Image 47
Atari XL manual Example Macros, Font Set

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.