Classic Computer Magazine Archive COMPUTE! ISSUE 72 / MAY 1986 / PAGE 10

Readers Feedback

The Editors and Readers of COMPUTE!

Setting Atari Tabs
I read with interest your examples of programming Atari tab stops using memory location 201. This location is in the BASIC zero page RAM because it is used only by BASIC, and can only be used with PRINT statements containing commas. The true tab function is executed by the operating system (the text editor). It is associated with memory locations 675-689. These memory locations form the tab set map. The highest bit of location 675 corresponds to column zero, and the lowest bit of location 689 corresponds to column 120 of the logical line. Normally every eighth bit is set (as can be seen by experimenting with the TAB key). This can be changed either with the TAB CLEAR and TAB SET keys or by POKEing values to the map locations. For example the following program clears the map with POKEs, then prints the heading while using the TAB SET character, CHR$(159). Then the names and  addresses are printed while using the TAB character, CHR$(127).

10 FOR I=675 TO 689:POKE
   I,0:NEXT I

20 DIM NAME$(10),ADDRESS$
   (25),TAB$(1),TABSET$(1
   )

30 TAB$=CHR$(127):TABSET$
   =CHR$(159)

40 PRINT "NAME{13 SPACES}"
   ;TABSET$;"ADDRESS"

50 PRINT
60 FOR A=1 TO 4
70 READ NAME$;ADDRESS$
80 PRINT NAME$;TAB$;ADDRE
   SS$

90 NEXT A
100 END
110 DATA ADAMS,12 MAIN ST
    REET

120 DATA ARTHUR,1515 SUNN
    Y STREET

130 DATA SMITHSON,100 CIR
    CLE DRIVE

140 DATA WEEKS,2 DONNA LA
    NE


Sherwood Stolt

Thank you for the additional information.