THE ATARI XL COMPUTERS
This book was finished just as the 600, 800, 1400 XL computers were about to be released. Atari has been late in releasing information about the new computers, but our secret "mole," DEEP CHIP, reports that the new computers use the same OS. Experiment to be sure and we will update this section in a future edition. We also have been told that customer service will provide a disk that can cause an XL computer to act like a 400/800. Call them if you have trouble running older programs on your computer.
You may already be aware that there is a big difference between the 1200XL and the earlier Ataris. Not only are there more features, but a lot of the software written for the 400/800 won't run on the 1200XL. Why not? Well, a lot of changes were made to the operating system, and all the people who used parts of the OS other than the vectors found that their programs didn't work on the 1200XL. Even Atari was guilty. So before we take a look at where the differences are, let me once again emphasize that you should never, never, never use any part of the OS other than the safe vectors (see Appendix Thirteen). This means that you should stay away from the OS RAM locations, with the exception of locations that the average person may want to use. This means that locations like LMARGN (82) and CRSINH (752) are safe, but locations like PBUFSZ (30) and FREQ (64) are not. The BASIC manual has a partial list of "safe" locations, with the exception of NEWROW and NEWCOL (96 through 98). If in doubt about whether or not you can use a location, don't. If you absolutely have to, get hold of both types of computers and make sure it works on both.
1200XL OS MEMORY MAP
Before we get into the specific changes to the OS, the following will give you an idea of where things are in the 1200XL memory. It assumes that DOS 2.0S is loaded, and that there is 48K memory. You should be able to make the appropriate changes for no DOS or less memory (Figure 61).
|0- 127||0000-007F||OS page zero RAM|
|128- 255||0080-00FF||BASIC or user page zero RAM|
|256- 511||0100-01FF||6502 stack|
|512- 1535||0200-05FF||OS RAM|
|1536- 1791||0600-06FF||Free RAM|
|7420-40959||1CFC-9FFF||BASIC or user RAM|
|52224-53247||CC00-CFFF||International character set ROM|
|55296-57343||D800-DFFF||Floating point package|
|57344-58367||E000-E3FF||Regular character set|
FIGURE 61. 1200XL memory locations
1200XL OS RAM DIFFERENCES
This section will summarize the differences between the version "B" OS and the 1200XL OS. I apologize that the explanations are not more thorough; detailed information on the 1200XL was not easy to come across at the time of this writing.
Used while originally debugging the OS.
A flag for the powerup self-test routine. When you first turn on the 1200XL, it checks all its memory locations to make sure they're working correctly.
These locations are simply described as "reserved," but from the name I suspect they are some kind of buffer pointers.
PTIMOT, which used to be at location 28, has been moved to 788.
PBPNT has been moved to 734.
PBUFSZ has been moved to 735.
PTEMP no longer exists.
This, along with any other locations that have the word "loader" in their description, is used by the relocating loader that the 1200XL uses to upload device handlers through the serial I/O port. As this description implies, it's not really something you need worry about.
CRETRY has been moved to 668.
DRETRY has been moved to 701.
A temporary handler loader location
CKEY has been moved to 1001
CASSBT has been moved to 1002.
There are four function keys on the 1200XL, labeled F1, F2, F3, and F4. FKDEF points to a table of values for the keys. When you press F2, for example, the second value in the table is used as the ATASCII value for the key. There are eight bytes in the table all together, with the last four being for Shift-F1, Shift-F2, Shift-F3, and Shift-F4. You can, if you want, change FKDEF to point to your own table.
NEWROW has been moved to 757.
NEWCOL has been moved to 758.
If PALNTS equals zero, then this is an NTSC Atari. Otherwise it's a PAL. See PAL at location 53268 for an explanation of the two.
NEWCOL+1 has been moved to 759.
In the 1200XL, not only can you redefine the function keys, you can also define the whole keyboard with the help of KEYDEF. Well, almost the whole keyboard. KEYDEF is of no help if you want to redefine the following:
BREAK, SHIFT, CTRL, OPTION, SELECT, START, RESET, HELP, CTRL-1, CTRL-F1, CTRL-F2, CTRL-F3, CTRL-F4.
What KEYDEF does is point to a 192-byte table. This table contains the ATASCII values to be assigned to the various keys. Here's how the bytes are used:
|64-127||SHIFT plus key|
|128-191||CTRL plus key|
And here's how the keys are ordered within each group of 64 bytes (Figure 62).
FIGURE 62. 1200XL keyboard layout
Suppose, for example, you pressed the "M" key. "M" is in the column marked "5" and the row marked "32", which means it is byte 37 (32+5). SHIFT-M would be the 101st byte (37+64), and CTRL-M would be byte 165 (37+ 128). These are the three bytes you would use to store the ATASCII values that you want assigned to those key combinations.
Before you attempt to change the table, you may want to check the one currently being used to get an idea of which values are assigned to each key. This will help you with keys like CTRL-CAPS and so forth. Once you've set up all 192 bytes somewhere in memory, change KEYDEF to point to the table.
ROWINC has been moved to location 760.
COLINC has been moved to location 761.
Another temporary loader variable.
A loader variable.
Another loader variable.
Reserved for undocumented uses.
LINBUF no longer exists.
The 1200XL has two built-in character sets: the regular one and a new international one. CHSALT supposedly holds the address (in pages) of the one that is not being used at the moment. It does not, however, seem to have any function at all on the 1200XLs I've been using.
You can use CTRL-F4 to switch between the two character sets.
This is a temporary fine-scroll location.
If this location is set to 255, then the entire keyboard is disabled, with the exception of the following:
CTRL-F1, RESET, OPTION, SELECT, START
CTRL-F1 will restore KEYDIS to zero, which will re-enable the keyboard. POKEing KEYDIS with any value between 1 and 254 will disable CTRL-F1 as well. The only way to re-enable the keyboard in this case is to POKE KEYDIS with a 0 or press the RESET key.
If you ever wished that you could fine-scroll program listings, or any other output to a graphics mode zero screen, FINE is the location for you. Set it to any value other than zero before your GRAPHICS command, and then try listing a program or PRINTing a lot of stuff to the screen. To get back to regular scrolling, POKE it with a zero before a GRAPHICS command.
A loader location.
CSTAT no longer exists.
Another loader location.
This was moved here from location 54.
TMPX1 no longer exists.
This was moved here from location 55. HOLD5 no longer exists.
Finally, something other than a loader location! DSCTLN is used to specify the length of a disk sector. Powerup and RESET set it to 128, but you can set it to anything between 1 and 65536.
Reserved for undocumented uses.
This one is actually useful. If you press a key and hold it down, after a short delay it will start repeating. KRPDEL specifies the delay. It's initialized to 48, which represents 48/60 = 0.8 seconds. You can change it to any value between 1 and 255, resulting in a delay between one-sixtieth of a second and 4.25 seconds. You can also set it to 0, which will disable the repeat function altogether.
Once a key starts repeating, there is another delay between repeats. KEYREP specifies this delay. It's initialized to six, or one-tenth of a second, which means that you will get 10 characters a second once a key starts repeating. You can make this as fast as 60 characters a second (KEYREP=1) or as slow as 1 character every 4.25 seconds (KEYREP=255).
If NOCLIK is set to 0, then the television speaker will make a "clicking" sound every time you press a key. Set it to 255 and it won't. CTRL-F3 will switch it back and forth between the two values.
By the way, if you set NOCLIK to a value other than 0 or 255, the click will be turned off and CTRL-F3 will have no effect on it; it can only be turned back on by pressing RESET or POKEing NOCLIK with a 0.
HELPFG is used to tell whether or not the HELP key is pressed. It can have the following values:
||means it's not pressed.|
||means that HELP is pressed.|
||means that SHIFT-HELP is pressed.|
||means that CTRL-HELP is pressed.|
You should note that HELPFG will not change to zero when the HELP key is released. That means that you should POKE 732,0 before you try and read it. Otherwise you may get an old value.
You can use CTRL-F2 to turn off DMA in order to speed up calculations. What happens is the OS stores a zero into SDMCTL at location 559. When you press any other key, SDMCTL will be reset to whatever value it was before. The OS uses DMASAV to hold the value of SDMCTL so it knows what to reset it to.
This was moved here from location 29.
This was moved here from location 30.
A handler loader flag.
Don't worry, this is still the same as it was before. The reason I'm mentioning it here is because there is now a new character set built into the computer. If you POKE CHBAS with a value of 204, you'll get an international character set. This is the same as the regular character set, except that the graphics characters have been redefined and are now letters and characters that English doesn't normally use.
You can use CTRL-F4 to switch back and forth between the two built-in character sets. If you have your own character set in memory, however, pressing CTRL-F4 the first time will switch you to the international character set, but pressing it again will give you the regular character set instead of yours. In other words, you can't use CTRL-F4 to switch between the regular character set and your special character set.
This was moved here from location 96.
This was moved here from locations 97 and 98.
This was moved here from location 121.
This was moved here from location 122.
JMPERS is used to tell how the system is configured. It is unclear at this time exactly what that means.
This was moved here from location 28.
TEMP2 was moved to location 787.
These are simply labeled as "power-up/reset." They seem to have some kind of effect on what happens if you press RESET, but I'm not sure what it is.
Another mystery, this one is simply described as "screen editor." I assume it's used as some kind of variable by the screen editor. POKEing values to it doesn't seem to have any effect, and it always reads zero.
This was moved here from location 74.
This was moved here from location 75.
CARTCK is the checksum value for the cartridge. It is used to make sure the cartridge is being read correctly.
Reserved for undocumented uses.
Cartridge interlock. The 1200XL lets you unplug and plug in a cartridge without turning the computer off first. CINTLK tells the OS whether or not a cartridge is currently being plugged in or pulled out. If it's equal to one, then everything is OK. If not, it will reboot the system. That means that POKEing CINTLK with anything other than one will have the same effect as turning the computer off and then back on again.
Handler chain. Sorry, but that's all I know about it.
You should also be aware that PORTB in the PIA chip (54017) is no longer used for controller jacks three and four, since there are only two controller jacks on a 1200XL. Similarly, any locations dealing with joystick two, joystick three, paddle four, paddle five, paddle six, or paddle seven will no longer be of any use.
EXTRA GRAPHICS MODES
That's right, the 1200XL gives you four extra modes that the 400/800 doesn't. Actually, that's not quite true. Back at SDLSTL we saw that there were five ANTIC graphics modes that BASIC didn't allow you to use unless you set up your own display list. All the 1200XL does is give the screen handler the capability to set up four of these modes for you. Graphics 12 will give you an ANTIC mode four display list, Graphics 13 ANTIC mode five, Graphics 14 ANTIC mode twelve, and GRAPHICS 15 ANTIC mode fourteen. For more information on each of these modes, see Appendix Twelve on ANTIC modes.
Return to Table of Contents | Previous Chapter | Next Chapter