Apple II User Manual

Page of 257
$301, $302, and $312 respectively). The SWEET 16 subroutine
of course performs the move, and is entered at Hex locations
$303 to $311 (see listing Number 3).
After the move, the screen will display three lines of data,
each 8 bytes long, and await entry of a new set of parameters.
The three lines of data displayed on the screen are as
follows:
     Line 1: The first 8 bytes of data starting at $800, which
             is the fixed source data to be moved (in this
             case, the string A$).
     Line 2: The first 8 bytes of data starting at the hex
             address entered as the destination of the
             move (high order byte only).
     Line 3: The first 8 bytes of data starting at $0000 (the
             first four SWEET 16 registers).
The display of 8 bytes of data was chosen to simplify the
illustration of what goes on.
Integer Basic has its own way of recording the string A$.
Because the name chosen for the string "A$" is stored in 2
bytes, a total of five housekeeping bytes precede the data
entered as A$, leaving only three additional bytes available
for display. Integer Basic also adds a housekeeping byte at
the end of a string, known as the "string terminator".
Consequently, for convenience purposes of the display, and to
see the string terminator as the 8th byte, the string data
entered via the keyboard should be limited to two characters,
and will appear as the 6th and 7th bytes. Additionally,
parameters to be entered include the number of bytes to be
moved. A useful range for this demonstration would be 1-8
inclusive, but of course 1-255 will work.
Finally, the starting address of the destination of the move
must be entered. Again, for simplicity, only the high-order
byte is entered, and the program allows a choice between
Decimal 9 and high-order byte of program pointer 1, to avoid
unnecessary problems (in this demonstration enter a decimal
number between 9 and 144 for a 48K APPLE).
The 8 bytes of data displayed starting at $00 will enable one
to observe the condition of the SWEET 16 registers after a
move has been accomplished, and thereby understand how the
SWEET 16 program works.
From the article "SWEET 16: A 6502 Dream Machine", remember
that SWEET 16 can establish 16 double byte registers starting
at $00. This means that SWEET 16 can use the first 32
addresses on zero page.
The "events" occurring in this demonstration program can be