WORKING ON THE APPLE//e PART III by Richard Karsmakers
Let's get on with our survey through Applebasic again. In the
previous issue, the PDL command was mentioned as last. I will
therefore now continue at PEEK.
PEEK
PEEK (Address)
Returns the byte stored at the given address. Both address and
the returned quantity are numbers. The address may be given as a
number, a variable, or an expression, and may be positive or
negative (negative address=true address-65535).
PLOT
PLOT x coordinate, Y coordinate
In low resolution graphics, this command places a dot (a pixel or
picture element) at the position given by the coordinates.
The coordinate value may be given numerically, by a variable or
by an expression. X values must be in the range 0-39, and Y
values must be in the range 0-47, with 0,0, at the upper left.
The color plotted is that given by the most recent COLOR
statement; or COLOR=0 is used if color has not been previously
specified.
In the text or graphics plus tet modes, for Y in range 40-47,
PLOT places a character at the location specified. The character
code corresponds to the color code.
There is no visible effect in the high resolution graphics mode.
POKE
POKE address,quantity
Stores the (byte) quantity at the address indicated. Both
quantity and address are in decimal and either may be specified
by a number, a variable or an expression. The maximum range of
addresses is -65535 to 65535, and of the quantities 0 through
255. Real values are converted to integers.
Receiving hardware must be present at the address for succesful
use. For memory, this is 0 to..
16 K - 16384
32 K - 32768
48 K - 49152
Memory mapped peripherals are normally at $C000 through $C07f
(decimal 49152 through 49279) (or -16738 through -16257).
POP
POP
'Pops' or removes one address from the GOSUB-RETURN address
stack.
The effect is to return to the second-most recent GOSUB rather
than to the recent.
Produces an error signal if there are no addresss on the stack.
POS
POS (dummy expression)
Returns the column number or horizontal position of the screen
cursor.
The expression is a dummy but must be evaluatable as a numeric.
For POS and SPC, positions are number from 0, whereas HTAB and
TAB are numbered from 1.
PRINT
PRINT
?
I feel like I'm being a bit foolish, underestimating my readers
when I would talk any more about this command than this. So I
won't.
PR#
PR# slot-number
Transfers output to the peripheral located in the designated
slot.
The slot number may be a numeric, a variable, or an expression,
and must evaluate to the range 1-7 inclusive.
A value of 0 returns output to the TV screen.
A value less than 0 or more than 7 prodeduces an error report.
PR# boots the disk if the specified slot contains a disk
controller.
READ
READ variable 1, variable 2,....
When encountered, READ sets the value of the specified, variable
or variables to the value of the elements of DATA lists, starting
from first variable in the first READ statement and the first
value in the DATA statement, and continuing through the DATA list
or lists until the READ list or lists are satisfied.
The position in the READ list is recorded. It may be set to the
beginning of the DATA list by the RESTORE statement.
RECALL
RECALL name
This function uses tape and is therefore useless on the ST.
REM
REM characters
There is no limit to REM length (up to available memory).
RESTORE
RESTORE
Resets the data list pointer to the beginning of the data list.
See READ and DATA.
RESUME
RESUME
Used at end of an error handling routine to cause program
execution to resume at the begining of the statement that
contained the error.
If the error handling routine has not correctly dealt with the
error, and endless lopp results. Use CONTROL C and RETURN to
escape.
If RESUME is encountered before an error has occured, the effect
may be unpredictable. Usually, execution will cease.
RETURN
RETURN
The signal to end a GOSUB subroutine.
When encountered, RETURN causes a branch to the statement
following the most recently executed GOSUB; that is, the address
of the statement at the top of the GOSUB stack.
Using a RETURN without a GOSUB or having more RETURNs than GOSUBs
causes an error message.
POP affects the GOSUB order of execution, but continue to watch
the number of RETURNs.
See GOSUB, POP
That's enough for this time's issue. I will continue with the
RIGHT$ command next time. See you then!
Disclaimer
The text of the articles is identical to the originals like they appeared
in old ST NEWS issues. Please take into consideration that the author(s)
was (were) a lot younger and less responsible back then. So bad jokes,
bad English, youthful arrogance, insults, bravura, over-crediting and
tastelessness should be taken with at least a grain of salt. Any contact
and/or payment information, as well as deadlines/release dates of any
kind should be regarded as outdated. Due to the fact that these pages are
not actually contained in an Atari executable here, references to scroll
texts, featured demo screens and hidden articles may also be irrelevant.