The Last Word 3.0 Reference Manual

12 PROGRAMMER'S TECHNICAL NOTES

This section first outlines LW's memory map, then goes on to discuss some of the general ideas behind the program. It isn’t a guide to writing extensions for LW (please refer to the extension developer’s documentation). If you're having problems running LW, you'll want to check out the section on memory usage. I'll also be talking about various tricks that LW employs, and why it has turned out the way it has.

12.1 ASSEMBLY LANGUAGE ADD-INS

From version 2.1 onwards, LW has presented assembly language programmers with the interesting opportunity to writing their own machine code routines to extend the functionality of the software. These pure machine code files must adhere to strict guidelines, and are (as of version 3) only available when using extended RAM. Add-ins (or extensions) are loaded at $3300 and can be up to 3K in size. They can hook into editor keystrokes, the reset routine, the print formatter, etc, and potentially provide anything from a character map to a spelling checker.

A toolkit for writing add-ins is available with the retail version of The Last Word, and will include a full equate list for the program, example add-ins, code samples, and guidelines for writing your own modules.

12.2 MEMORY USAGE

Although the LW.EXE executable is over 31K long, about 4K is initialisation code which is jettisoned once the program is up and running. 14K of the program code goes straight under the OS ROM between $C000-$CFFF and $D800-$FFFF, and memory between $2000 and $3200 is a mixture of program code, data and buffers. When using BANKED memory, the main text buffer occupies memory from $3300-$7FFF (depending on the size of the add-in buffer which resides at $3300 when active), and the $4000-$7FFF area is a window onto any text buffers which reside in banked memory. When banked memory is turned off, the main text buffer occupies the area $4000-$7FFF, $3300-$3FFF being used by internal buffers.

LW also uses several other regions for data storage, including the entire upper half of page zero ($80-$FF). ALL memory from $3FD to $6FF is used by LW for buffers. This area includes the OS cassette buffer, which you're (hopefully) unlikely to need. Note that it’s no longer possible (as of version 3.0) to re-enter LW using “Run at Address” from the DOS menu. This is because the program unhooks itself completely from beneath the OS ROM when you exit to DOS.

You should ensure that no resident handlers use memory from $400-$6FF, otherwise conflicts with LW will certainly occur. Similarly, and TSRs or resident handlers must not extend about $2000. SpartaDOS X set-ups can provide very low MEMLO values which can allow for resident handlers to be installed. However, with DOS 2.5 systems, there’s unlikely to be any room for additional sector buffers, etc.

One of LW’s largest memory demands is for the 80 column screen display, which consumes about 9K of RAM. For this reason, it has proved quite a feat to shoe-horn all of LW’s functionality into the remaining memory space. Even so, LW still remains true to its original remit: that it should run on an unexpanded 800XL.

12-71

Page 71
Image 71
Atari XL manual Programmers Technical Notes, Assembly Language ADD-INS, Memory Usage

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.