BASIC XL, BASIC XE / programming / commercial

From: Michael Current (aa700@cleveland.Freenet.Edu)
Date: 01/18/92-12:40:57 PM Z


From: aa700@cleveland.Freenet.Edu (Michael Current)
Subject: BASIC XL, BASIC XE / programming / commercial
Date: Sat Jan 18 12:40:57 1992


Reprinted from A.C.E.C. BBS (614)-471-8559

          Power & Ease
       BASIC XL/BASIC XE

         by Tom Smith
  First Atari Computer Club 
         of Spokane

  Atari BASIC may come with Atari
computers, but it is not the BASIC
that you should be using.  BASIC XL
and BASIC XE are the BASIC
languages that everyone should be
using.  This is a bold statement,
but let us take a look at these
superior BASICs from OSS.

  OSS was the original producers of
Atari BASIC, and they did a fine
job of placing it in 8K.  BASIC XL
is the second generation of Atari
BASIC and its total size has been
increased to 16K.  This jump in
size was not done at a loss to the
amount of memory available for
programming.  OSS uses a bank
selected cartridge, so that at any
time only 8K of the cartridge shows
itself at a time.  BASIC XE follows
along the same lines, and is a
further enhancement to BASIC XL. 
BASIC XE uses the same 16K bank
selected cartridge, but on an XL/XE
series computers it will load from
disk an additional 11K of
extensions and place this under the
Operating System.  This gives BASIC
XE a total size of 27K with no loss
of programming space.

  BASIC XL/BASIC XE share most of
the same basic features that I will
be discussing in this article, so I
will just refer to BASIC XL for the
rest of the article.  I will leave
this one final note on BASIC XE. 
If you own a XL/XE series computer
(especially if you have or intend
on getting a memory upgrade) then
BASIC XE is your definite choice
(with 128K of memory BASIC XE can
give you 64K for program space and
32K for variables).

  The one big thing I enjoy about
BASIC XL is its ease of use.  BASIC
XL makes a lot of tedious jobs
associated with programming a snap.
Have you ever had a problem of
remembering to go back to CAPS
after typing in a PRINT statement
in lower case.  Well, BASIC XL does
not care what case your in when
entering programs, you can ever be
in inverse video.  This makes
program entry easy, and produces a
easy to read listing.  Also, Error
messages are not given in cryptic
numbers, but are given as a number
with a word description of the
malfunction.  I should mention here
that error codes are the same in
BASIC XL as in Atari BASIC (Atari
BASIC programs are 100% compatible
with BASIC XL).  Two more features
that make BASIC XL friendly to use
are Auto Line Numbering and program
Renumbering.  You can also delete
either single lines or a range of
lines with the DEL command.  This
is much cleaner and faster than
typing a bunch of line numbers
followed by 'Carriage Returns'. 
When it comes time to debug your
programs two neat functions are the
LVAR command and TRACE mode.  LVAR
produces a listing of all the
variables used by a program and
also the line numbers that they are
used in.  For those errors that you
don't have a clue as to their
origins you have the ability to
TRACE a programs execution.  In
TRACE mode you run the program and
the line number of the line about
to be executed is displayed on the
screen surrounded by square
brackets.  This continues until
either 1) an error occurs 2) the
end of the program is encountered
3) you stop execution with the
'Break' key.

  You will be absolutely amazed at
how these features can make your
programming a much more joyful
experience over Atari BASIC.  But
wait, there is one more thing that
makes your life easier.  Are you
tired of having to go to DOS for
simple directory listing that gets
erased anyway when you go back to
BASIC ?  BASIC XL solves this
problem by having its own mini-DOS.
You can get Directory listings,
Protect & Unprotect files, Erase
files, and Rename files without
leaving BASIC XL.  Talk about
convenience !

  The features discussed so far are
just things that make your life
easier in the immediate mode of
BASIC XL.  Now we can get into all
the nifty new commands that you can
use in the program mode.  All the
commands and structures of Atari
BASIC are exactly the same in BASIC
XL with the addition of the
commands listed below.  For the
sake of space I will list the
commands followed by only a short
description (just enough to wet
your appetite).  

  FAST -Usually the first statement
of your program.  Allows your
programs to run significantly
faster than normal.

BGET/BPUT -allows you to
 input/output a specified # of
 bytes from memory to a given
 device.

DIM A$(4,40) -string arrays

DPOKE/DPEEK -Poke/Peek two bytes of
 data into/out(of) memory (High/Low
 byte order)

ELSE -IF something THEN do this
 ELSE do this instead

INPUT "....";A -a statement can be
 printed before the computer waits
 for an input.

MOVE -move chunks of memory around
 at machine language speed

PRINT USING -you can define the
 format of a printed line by
 setting up a format string
 containing format commands and
 then supplying a list of the
 variables that contain the info
 you wish displayed in the
 different fields.

RGET/RPUT -allows you to
 input/output fixed length records
 made of any combination of string
 and numeric data

TAB -computer will TAB out a given
 number of spaces

WHILE/ENDWHILE -While a given
 statement is true this l
oop will
 continue to execute until it turns
 false

ERR -can either return the # of the
 last error -OR- the line # where
 the last error occurred

FIND -searches a string for a given
 sub-string and if found returns
 the location at which the
 sub-string starts.

HSTICK -detects only horizontal
 movement of the joystick returning
 either 0,1,-1

VSTICK -same as HSTICK but detects
 vertical movement only

PEN -returns the values in the
 lightpen registers

LEFT$/RIGHT$/MID$ -allows you to
 pull a given # of characters from
 either the Left/Right side of a
 string or from the Middle(MID).

HEX$ -allows you to convert a
 decimal # in a four digit
 Hexadecimal number (BASIC XL)
 allows you to use HEX #'s in your
 programs by placing a '$' before
 the number

Player Missile Support

BUMP -detects collisions between
 Players, Missiles, and Playfields

PMADR -returns the location in
 memory that a given Player/Missile
 is occupying

PMCLR -Clears a Player/Missile

PMCOLOR -Specify color for
 Player/Missile

PMGRAPHICS -Enable/Disable PM
 (Player/Missile) graphics

PMMOVE -Move PM to any location on
 screen

PMWIDTH -Define resolution of PM

MISSILE -Allows parent Player to
 shoot a Missile


  Well there you have it.  A very
brief overview of the capabilities
of BASIC XL/BASIC XE over Atari
BASIC.  You cannot go wrong
investing the $39 (BASIC XL) or $49
(BASIC XE) to give your Atari the
power of one these premier BASICs. 
>From the beginner to advanced
programmer these two languages have
it all.

  P.S. Prices quoted are Mail-Order


-- 
 Michael Current, Cleveland Free-Net 8-bit Atari SIGOp   -->>  go atari8  <<--
   The Cleveland Free-Net Atari SIG is the Central Atari Information Network
      Internet: currentm@carleton.edu / UUCP: ...!umn-cs!ccnfld!currentm
      BITNET: currentm%carleton.edu@interbit / Cleveland Free-Net: aa700


-----------------------------------------
Return to message index