Apple II User Manual

Page of 257
observed:
    When BASIC stores a program on cassette, it inserts a CTRL/Z after the last line.  The
    AIM 65 Editor will strip off the CTRL/Z when it retrieves the program.  Therefore,
    before storing a BASIC program from the Editor, the user must insert a CTRL/Z
    following the last line of the program.
H  ATN IMPLEMENTATION
The ATN function (see Subject 307) can be programmed in RAM using the AIM 65 Mnemonic
Entry (I) and Alter Memory Locations (/) commands, as shown below.  The program is written
for the AIM 65 with 4K bytes of RAM.  The ATN function can be relocated elsewhere in memory
by changing the starting addresses of the instructions and constants, the conditional branch
addresses, the vector to the constants start address and the vector to the ATN function starT
address.
ATN FUNCTION CONSTANTS ENTERED BY ALTER MEMORY <M>
<M> = 0F80  XX  XX  XX  XX    Constants Starting Address = 0F80
</> = 0F80  0B  76  83  83                                     8
</>   0F84  BD  D3  79  1E
</>   0F88  F4  A6  F5  7B
</>   0F8C  83  FC  B0  10
</>   0F90  7C  0C  1F  67
</>   0F94  CA  7C  DE  53
</>   0F98  CB  C1  7D  14
</>   OF9C  64  70  4C  7D
</>   0FA0  B7  EA  51. 7A
</>   0FA4  7D  63  30  88
</>   0FA8  7E  7E  92  44
</>   0FAC  99  3A  7E  4C
</>   0FR0  CC  91  C7  7F
</>   0FB4  AA  AA  AA  13
</>   0FR8  81  00  00  00
</>   0FBC  00
ATN FUNCTION INSTRUCTIONS STORED BY MNEMONIC ENTRY (I)
<I>
XXXX *=0FBD                   Instructions Starting Address = 0F8D
0FBD A5 LDA AE
0FBF 48 PHA
0FC0 10 BPL 0FC5
0FC2 20 JSR CCB8
0FC5 AS LDA A9
0FC7 48 PHA
0FC8 C9 CMP #81
0FCA 90 BCC 0FD3
0FCC A9 LDA #FB
0FCE A0 LDY #C6
0FD0 20 JSR C84E
0FD3 A9 LDA #80 \             Starting Address of Constants = 0F80
0FD5 A0 LDY #0F /
0FD7 20 JSR CD44
0FDA 68 PLA
0FDB C9 CMP #81
0FDD 90 BCC 0FE6
0FDF A9 LDA #4E
0FE1 A0 LDY #CE
0FE3 20 JSR C58F
0FE6 68 PLA
0FE7 10 BPL 0FEC
0FE9 4C JMP CCB8
0FEC 60 RTS
0FEC
BASIC INITIALIZATION FOR ATN FUNCTION
BASIC memory must be initialized below the memory allocated to the ATN function.  The ATN
vector in RAM must also be changed from the address of the FC error message to the starting