Apple II Original ROM Information
 Qjjj
Data
 0005A0 FDA9A920 EDFDA98D 4CEDFDA9 8D4CEDFD
Page
Page
Page
 JI@
Page
 001AA0 F3FFE8E1 E8E8EFEB FFFFE0FF Ffefeeef
001AC0 FFFFE1E1 EFEEE7E8 EEE7F3FB FBEEE1EF
001AE0 E8EEE7E8 Efefeeef Eeefeeee Efeeeeee
 001DB0 9CDD9CDE DD9EC3DD Cfcacdcb 00479AAD
 001FB0 Ffffffff FFFF2071 E14CBFEF 2003EEA9
Page
 FA60FFFF
DDBAF9F0 0DBDBAF9
02E61FBD JJJ
60FFFFFF .JJ
 AEAEA8AD
Page
Page
 Return
Page
 LOC0
System Monitor Copyright
LOC1
Basl
 Mask
 INY NO, INC Index X-COORD
 LDY PCH
 PRMN1 LDA
 FMT1 DFB
 Format Above
 EOR
 STA A3H FAE2 A2 FB
 Tabv STA Vtabs to ROW in A-REG
 STA Bash
 BCC Clreol Clear to END of Line
 NXTA4 INC A4L Incr 2-BYTE A4
 STA BASL,Y Replace Flashing Screen
 Fdad A5 3C
 LT2 LDA A2L,X Copy A2 2 Bytes to
 Ioprt LDA A2L SET RAM IN/OUT Vectors
 BCC RD3 Loop Until Done
 STA A3H,X
 DFB LIST-1 FFF3 CC
 BRTBL,X
Save
 LSR Prepare Carry for BC, BNC
 Stat LDA R0L
 JSR STAT2 Push LOW PC Byte VIA R12
 CMP
LDA IN,Y
BNE Nomove
JSR
 DCR
Mloop
BNZ Mloop
RTN
 BNC
INR
BNZ
BM1
 Load Indirect
Example
Store Indirect
Load DOUBLE-BYTE Indirect
 Store DOUBLE-BYTE Indirect
POP Indirect
Store POP Indirect
 ACC
Subtract
POP DOUBLE-BYTE Indirect
 BF A0 SET $A0BF
Compare
LOOP1 SUB
BNC LOOP1
 Decrement
Return to 6502 Mode
LOOP2
BNZ LOOP2
 Branch if Carry SET
Branch if no Carry
Branch if Plus
LOOP3 SUB
 Branch if not Minus ONE
Branch if Minus ONE
Break
Return from Sweet 16 Subroutine
 LDA #ADRH
STA IND+1 LDA OPTBL,X
STA IND JMP
Page
Page
 Sweet 16 Introduction
Page
 Source
 Print Dbload Sweet REM Ctrl D
DSP
Input Enter String a $ , a $
NVA
 Print Print Goto
Poke 776 , a REM Poke Destination
Call -605 Return REM XAM8 in Monitor
Sweet
 Baum
MINI-ASSEMBLER
Mneml
Mnemr
 SBC PCL Form ADDR-PC-2
 JSR Cout Position
 FORM7 STX A1H Save Index
 CLC
ORG
STA
BNE
 Norm LDA EXP1 ZERO?
 Shift Dividend Left
 Floating Point Representation LOW
Floating Point Package
 High LOW EXP Mantissa
Stored
Floating Point Representation Examples
Number Exponent Mantissa
 Floating Point Subroutine Descriptions
Page
Page
Page
Page
 STY
STY Init MANT1 LDY
Calling Sequence
HIGH-ORDER
Page
Page
Page
Page
Page
Page
 Seeeeeee
Mmmmmmmm
Fsub
 ORG SET Base page Adresses
 STA X2,X
 Common LOG of MANT/EXP1 Result in MANT/EXP1
 Ovflw BRK Overflow
 1EBB STA X2,X Load EXP/MANT2 with Z 1EBD DEX 1EBE BPL LF3
 Right Shift MANT1 or Swap with MANT2 on Carry
YES,RETURN with MANT1 Normalized
CMP
Addend
 Normx BCC Norm If EXEN, Normalize PRODUCT, Else Complement
 Errata for Rankins Floating Point Routines
LDX Load X for High Byte of Exponent
LDA STA
 Fadd
LOG
Fsub
Fmul
Page
 Mantissa
 MOD 9/76 Load X for Later
 M2MHL
 Contin
 1EAD LFA LDA Z,X
 L2E DCM
 RTLOG1
Mdend
Normx
 Object Code Dump
Page
 Hsbdry
Tapdel
Toutfl
Lstcom
 Urcvec
Outvec
=UBRKVC
=UIRQVC
 ADC
TAX
 Stocom STA
ORA
 BPL HASHUS+2
 Restore Except A,F
 STX
BEQ
CPX
JMP
 Chksad PHP
Exwrap RTS
Outxah PHA
TXA
 Nibasc and #$0F Nibble in a to Ascii in a
 BCS INST1
 RTI
 Ldbyte JSR Inbyte
 Verify MEM
 E1PARM JMP
 STD2
 MORED2 LDY
 JSR Brtt INC Ercnt UP to FF
 MEM3EX CLC
 SBC P3L
 BNE Exitgk
 Ksconf LDA
 Txtmov LDA
 BNE INRT2
 Outone
 Newdev LDA
Dftxfr LDX
 LDA Toutfl
 8BFF 0D
 Msfirst
 Bufadh
Ddrdig
LOADT2
 STA Mode
 BNE Lcerr Last Char not
 Kgettr LDA
 H8DFF
 BCC PACKT3
 DUMPT1 TXA
Dumpt
DMPT1A LDA
DUMPT4 LDY
 Outbth LDX
 Outcht STX
Register Name Patch
 HS Tape Boundary
 Udrah
Rockwell International
Uddra
Nowln
 Length
Oldlen
Movad
TMASK1 =MOVAD
 Checksum
Curpos
Tabuff
TABUF2
 Write Edge Detect Control not Used Because KB
 EQS
CRB
 CFD2A0A0A0A0
DB TO,EQS
 SEI Disable Interrupt
 RS6 JSR Crlow Clear Display
 E1AC Have Valid Command
 Space Comm
Nxtadd TYA
 LOAD1A LDA
For
 LOADK5 LDX
 JMP LOADK5 Next
 E46A EE INC Bkflg SET FLG
 OUTCK1 PHA
Outcks LDA
 DUMPT1 LDA
Dumpta LDX
 E5EA
 TOGTA1 LDA
 TOGTA2 LDA
 BCC JD3
 MSG
 Whereo LDY
 CPY
ANY Other
 STA Outflg
 Outall PHA
Output PHA
 ROL Priflg Restore FLG
 Wrax JSR Numa
 EAA3 CA DEX
 Memerr JSR
 STA STIY+2
 Dehalf LDA
 EC5E 4A LSR Only ROW
 Debkey LDX
Onekey LDA
 ED3B GET a Char from Tape Subroutine
 Edba
 LSR Cpiy Make Room for MSB
 Outtty PHA
 OUTD1A CPX
OUTD2A TXA
OUTDD1 PHA
 LDA First Chip Select
 Prndot LDA
 LDA #PRTIME/256 Start T2 for 1.7 Msec
 BIT Imask See if DOT is SET
 Newcol LDA
NEW Print ROW
 Bkcksm LDA
Ckbuff LDA
 OUTTA2 LDX
OUTTA1 PHA
 Zero Leftmost Column
F2E1 3E7E7F3E7F7FCOL0
 DB BGYU76HN
 Getfmt TAX
Rtmode
MNNDX1 LSR
MNNDX2 LSR
 PRADR2 LDA
PLA
PRADR4 DEX
 BPL PCADJ4
 AIM Text Editor
 LDA END+1 CMP with END
 AF E7 JMP KEP
 RUB
 COMMAND-FIND String
 JMP CHN1
 See if WE RAN Past END of Buffer Limit
 BEQ REP2
 SBC Oldlen
 GOGO1 RTS
 ROM Table
FB46 8A9AAABACADA
Startm JSR
 Rdaddr LDY
 IMMED1 LDX
Tryjmp LDA
 OPCMP1 LDA
Brnchc JMP
Convrt LDA
 FORMD2 LDX
Brcomp LDA
Compbr LDX
 Forwrd LDA
Backwd LDA
 Curead TXA
MATCH1 JMP
 PATCH4 LDX CURPO2 Dont do Anything if 8D
 PATC15 JSR Crlf Decode Command
 ADDS1A
Addblk
Bkcksm
Brcomp
 CRA
 Goerr
 Namo E8CF NAMO1
 RD2 EA5D RD1
 E6AC
AIM 65 Microcomputer Monitor Program Listing
 Table of Contents
AIM 65 Microcomputer Basic Language Reference Manual
Introduction
 Entering Basic
Installing Basic in the AIM ROM Installation Procedure
Memory SIZE?
WIDTH?
 Reentering Basic
Exiting Basic
Basic Cursor
Printer Control
 Getting Started with Basic Basic Command SET
ASC
CHR$
 Indirect Commands
Direct and Indirect Commands Direct Commands
Operating on Programs and Lines
Listing a Program
 Replacing a Line
Deleting a Line
Deleting a Program
List Printing Data
 Print ONE Half Equals 1/2
Number Format
Number Output Format
 Variables Assigning Variables with AN Input Statement
Input R
Variable Names
 PSTG$
Print A, A*2 LET Z=7 Print Z, Z-A
Reserved Words
 Remarks
Program Using Relations
Relational Tests
Input B
 Square Root Program
Looping
AN Improved Square Root Program
Print Nsqrn
 Print Nsqrn Next N
Another Square Root Program
COUNT-BACKWARD Program
Some Other Looping Operations
 Print I,J Next Next J
Print What is the Number
Matrix Operations
Sort Program
 Input N
Print BAD GUESS, TRY Again Restore
Print Must be Integer
Stopping a Program
 $=ROCKWELL R6500 Print A$ Rockwell R6500
Strings
LEN Function
Print LENA$,LENMICROCOMPUTER
 MID$ Function
RIGHT$ Function
 Print C$ Basic FOR-ROCKWELL-R6500 VAL and Strs Functions
Print B$ Basic for Rockwell R6500
CHR$ Function
Data AIM 65,DOG
 Name Example PURPOSE/USE DIM
Additional String Considerations
Input Input X$
Print Print X$
 ESC
Operators Symbol Sample Statement
Cntl Print
Print X/1.3
 Symbol Sample Statement PURPOSE/USE
Negation
Relational Operators
 Operator Argument Result Not
Not If not Q3 then
 Print Intruder Alert
Commands
Alert
Statement SYNTAX/FUNCTION Example Clear
 Statement SYNTAX/FUNCTION List
Statement SYNTAX/FUNCTION FRE
Statement SYNTAX/FUNCTION Load
Statement SYNTAX/FUNCTION NEW
 Statement SYNTAX/FUNCTION Example Save
Statement SYNTAX/FUNCTION Example RUN
Program Statements
Statement SYNTAX/FUNCTION Example DEF
 Statement SYNTAX/FUNCTION DIM
Statement SYNTAX/FUNCTION END
Statement SYNTAX/FUNCTION For
 Statement SYNTAX/FUNCTION Goto
Statement SYNTAX/FUNCTION Gosub
Statement SYNTAX/FUNCTION IF...GOTO
Statement SYNTAX/FUNCTION IF...THEN
 Statement SYNTAX/FUNCTION LET
If X0 then Print ERROR, X Negative Goto Example
Statement SYNTAX/FUNCTION Next
Statement SYNTAX/FUNCTION ON...GOSUB
 Symbol SYNTAX/FUNCTION Wait
Statement SYNTAX/FUNCTION Restore
Example Restore Return
Statement SYNTAX/FUNCTION Return
 Statement SYNTAX/FUNCTION POS
Statement SYNTAX/FUNCTION Input
Statement SYNTAX/FUNCTION Print
Print Value ISA
 Statement SYNTAX/FUNCTION SPC
Statement SYNTAX/FUNCTION Read
Statement SYNTAX/FUNCTION TAB
String Functions Statement SYNTAX/FUNCTION ASC
 Statement SYNTAX/FUNCTION LEN
Statement SYNTAX/FUNCTION LEFT$
Statement SYNTAX/FUNCTION MID$
Statement SYNTAX/FUNCTION RIGHT$
 Statement SYNTAX/FUNCTION ATN
Arithmetic Functions Statement SYNTAX/FUNCTION ABS
Statement SYNTAX/FUNCTION COS
Statement SYNTAX/FUNCTION EXP
 Print Sgnx
Statement SYNTAX/FUNCTION Example SGN
Statement SYNTAX/FUNCTION Example SIN
Print Sinx
 Error Messages
?XX Error
Inverse Hyperbolic Secant
 TAB, SPC
Space Hints
PRINTX,Y,Z
 Speed Hints
Storage Allocation Information
 Converting Basic Programs not Written for AIM 65 Basic
This is Probably the Most Important Speed Hint
OLD AIM
OLD
 Ascii Character Codes Decimal
Assembly Language Subroutines
NUL
SOH
 $AE
Address Content
Inputnumbern
Printx
 Recording on Cassette Using the Basic Save Command
RUN NUMBER?
Storing AIM 65 Basic Programs on Cassette
 OUT=T F=
Cassette Operations Using the AIM 65 Editor
OUT=T F=FNAME T=
IN=
 Entered by Alter Memory M
ATN Implementation
OF9C
0FAC
 Saving ATN Object Code on Cassette
WIDTH? Bytes Free AIM 65 Basic