Console function keys
References- Memory map taken from the book Mapping The Atari - Revised Edition (article Memory Map)
Using the Start, Select and Option console keyStart, Select and Option console keys are read by CONSOL, system name for memory address 53279 ($D01F):
|CONSOLE KEYS||PEEK(53279)||BIT VALUES|
|START + SELECT||4||00000100|
|START + OPTION||2||00000010|
|SELECT + OPTION||1||00000001|
|START + SELECT + OPTION||0||00000000|
Using the Help console keyHELP console key is read by HELPFG, system name for memory address 732 ($2DC):
|SHIFT + HELP||81|
|CONTROL + HELP||145|
To clear the HELP key, POKE 732,0.
Using the Reset console keyImportant memory addresses involving RESET console key usage:
Warmstart flag. If the location reads zero, then it is in the middle
of powerup; 255 is the normal RESET status. Warmstart is similar
to pressing RESET, so should not wipe out memory, variables, or
programs. WARMST is initialized to zero and will not change
values unless POKEd or until the first time the RESET button is
pressed. It will then read 255 ($FF).
Warmstart normally vectors to location 58484 ($E474). WARMST is checked by the NMI status register at 54287 ($D40F) when RESET is pressed to see whether or not to re-initialize the software or to re-boot the disk.
Coldstart flag. Zero is normal, if zero, then pressing RESET will
not result in reboot. If POKEd with one (powerup in progress
flag), the computer will reboot whenever the RESET key is
pressed. Any non-zero number indicates the initial powerup
routine is in progress.
If you create an AUTORUN.SYS file, it should end with an RTS instruction. If not, it should POKE 580 with zero and POKE 9 with one. You can turn any binary file that boots when loaded with DOS menu selection "L" into an auto-boot file simply by renaming it "AUTORUN.SYS". Be careful not to use the same name for any two files on the same disk.
When this is combined with the disabling of the BREAK key discussed in location 16 ($10) and the program protection scheme discussed in location 138 ($8A), you have the means to protect your BASIC software fairly effectively from being LISTed or examined, although not from being copied.
|58484 ($E474)||WARMSV||Warmstart entry point (RESET button vector). Initializes the OS RAM region. The RESET key produces an NMI interrupt and a chip reset (see below). Jump to here on an NMI caused by pressing the RESET key. Initialized to 61723 ($F11B).|