Classic Computer Magazine Archive ANTIC VOL. 6, NO. 2 / JUNE 1987

Page 6: The Informer

Look through BASIC Status windows

BY MATT LOVELESS & MIKE EGGERS


Jennifer Brabson's KoalaPad picture Clown shows how you can still have the text of Informer line at the top of your screen-even while you've got a full high-resolution picture filling up the rest of the screen. "Mode: A" indicates what all input will be in upper-case. "R 02 C 02" tells you that the cursor is in the second column of the second row. The "F $6130" tells you how much memory is free-in hexadecimal. In decimal, that's 24,880 bytes free. The Informer updates the information at the top of your screen every 1/60 of a second.

The Informer puts a four-item status line into the screen display of your BASIC programs. You'll see your current row, column, memory available and caps/ulc mode. This final installment of the Page 6 Grab-Bag is a BASIC program that works on all 8-bit Atari computers of any memory size, with disk drive.

The third and final installment of our Page 6 Grab-Bag series is a single program, The Informer, that creates a single-line "text window" in your 8-bit Atari and lets you see the current [SHIFT][CAPS] mode, the cursor row and column, and the amount of free memory left for your BASIC program.
   (Page 6 is a 256-byte block of memory extending between locations 1536 to 1791-$0600 $06FF in hexadecimal. "Protected" from the operating system and BASIC, Page 6 provides a safe homebase for fast, powerful machine language routines which can be called from your BASIC program. NOTE: See this issue's HELP section for a line that was accidentally left out of Listing 3 in the March 1987 installment!-ANTIC ED)

The Informer places a status line above your standard screen display. The information there is updated sixty times per second. From left to right, the line provides the following information:

MODE indicates the current [CAPS]-lock status. If you press [SHIFT] and [CAPS], a letter "A" is displayed, indicating all input will be in upper-case. Similarly, an "a" indicates lower case, while a heart character  is shown when all key-presses are to be interpreted as [CONTROL] characters. This occurs when you press [CONTROL]-[CAPS]. MODE also indicates whether input is in inverse video or normal mode.

ROW, COLUMN shows the current cursor position. In addition to the GRAPHICS 0 cursor, the position of the invisible graphics cursor is displayed as well. Note that in GRAPHICS 7 or 8, garbage will appear here if a number is greater than 40.

FREE provides a hexadecimal display of how many free bytes of memory are available to the BASIC programmer. Free memory is calculated by subtracting the value of MEMTOP (top of memory) from LOMEM (bottom of memory).

MEMTOP is a two-byte pointer to the top of BASIC memory To determine MEMTOP, take the value found in memory location 145 ($91) and multiply it by 256. Add this number to the value found in location 144 ($90). In other words:

MEMTOP=PEEK(145)*256 + PEEK(144)

LOMEM may be calculated similarly using memory locations 128 and 129 ($80, $81). LOMEM is maintained by BASIC and must not be confused with the operating system's MEMLO.

Once invoked, The Informer stays at the top of the screen until the computer is turned off, or the Deferred Vertical Blank vector (VVBLKD, locations 548-549 ($0224-$0225) is reset.

If you switch screen modes, The Informer's status line will redraw itself at the top of the new display. Even pressing [RESET] will not disturb The Informer. And since it sits above the screen that Atari uses, The Informer will not hamper program operation.

The Informer status line disappears during time-critical periods such as disk I/O. It reappears, updated and ready to go, when the critical period is over. This line replaces one of the BLANK 8 LINES instructions in the ANTIC display list. You can disable The Informer by pressing [OPTION] [SHIFT]- [RESET]. Reinstate it with [SHIFT]-[RESET]. This routine will not work with the Atari Editor/Assembler cartridge because the cartridge squelches all deferrred vertical blanks.

Type in Listing 1, INFORMER.BAS, and SAVE a copy before you RUN it. When RUN, this program creates a disk file called INFORMER.EXE, which is the final machine language program.

To use The Informer, copy INFORMER.EXE to another disk (make sure the disk has the DOS.SYS file on it!). Next, change the name of INFORMER.EXE to AUTORUN.SYS. Now, re-boot your Atari with this disk, and The Informer will appear.

Listing 2, INFORMER.M65, is the MAC/65 assembly language source code. You do not need to type in this listing, as it is provided for your information. Antic Disk owners will find INFORMER.EXE and INFORMER.M65 on their monthly disk.

Cousins Matt Loveless and Mike Eggers were both in their mid-teens when Page 6 was originally released on disk by Synapse Software in 1982.

IF YOU'D ENJOY SEEING MORE ARTICLES LIKE THIS ONE, CIRCLE 183 ON OHE READER SERYICE CARD.

Listing 1  INFORMER.BAS
Listing 2  INFORMER.M65 Download / View

On Disk  INFORMER.EXE Download