Apple II User Manual

Page of 257
studied in the first four SWEET 16 registers. Therefore, the
8 byte display starting at $0000 is large enough for this
purpose.
These four registers are established as R0, R1, R2, R3:
R0        $0000     &   0001       -SWEET 16 accumulator
R1        $0002     &   0003       -Source address
R2        $0004     &   0005       -Destination address
R3        $0006     &   0007       -Number of bytes to move
 .
 .
 .
R14       $001C     &   001D       -Prior result register
R15       $001E     &   001F       -SWEET 16 Program counter
Additionally, an examination of registers R14 and R15 will
extend and understanding of SWEET 16, as fully explained in
the "WOZ" text. Notice that the high order byte of R14,
(located at $1D) contains $06, and is the doubled register
specification (3X2=$06). R15, the SWEET 16 program counter
contains the address of the next operation as it did for each
step during execution of the program, which was $0312 when
execution ended and the 6502 code resumed.
To try a sample run, enter the Integer Basic program as shown
in Listing #1. Of course, REM statements can be omitted, and
line 10 is only helpful if the machine code is to be stored
on disk. Listing #2 must also be entered starting at $300.
NOTE: A 6502 disassembly does not look like listing #3, but
the SOURCEROR disassembler would create a correct disassembly.
     Enter "RUN" and hit RETURN
     Enter "12" and hit RETURN (A$ - A$ string data)
     Enter "18" and hit RETURN (high-order byte of destination)
The display should appear as follows:
     $0800-C1 40 00 10 08 B1 B2 1E  (SOURCE)
     $0A00-C1 40 00 10 08 B1 B2 1E  (Dest.)
     $0000-1E 00 08 08 08 0A 00 00  (SWEET 16)
NOTE: The 8 bytes stored at $0A00 are identical to the 8
bytes starting at $0800, indicating that an accurate move of 8
bytes length has been made. They are moved one byte at a
time starting with token C1 and ending with token 1E. If
moving less than 8 bytes, the data following the moved data
would be whatever existed at those locations before the move.
The bytes have the following significance:
A Token$
     C1     40   00    10    08     B1     B2        1E
     ---------  ----   --------     ---------        --