Apple II Original ROM Information
 Data
Qjjj
 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
 02E61FBD JJJ
DDBAF9F0 0DBDBAF9
FA60FFFF
60FFFFFF .JJ
 AEAEA8AD
Page
Page
 Return
Page
 LOC1
System Monitor Copyright
LOC0
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
 Save
BRTBL,X
 LSR Prepare Carry for BC, BNC
 Stat LDA R0L
 JSR STAT2 Push LOW PC Byte VIA R12
 BNE Nomove
LDA IN,Y
CMP
JSR
 BNZ Mloop
Mloop
DCR
RTN
 BNZ
INR
BNC
BM1
 Store Indirect
Example
Load Indirect
Load DOUBLE-BYTE Indirect
 Store DOUBLE-BYTE Indirect
POP Indirect
Store POP Indirect
 ACC
Subtract
POP DOUBLE-BYTE Indirect
 LOOP1 SUB
Compare
BF A0 SET $A0BF
BNC LOOP1
 LOOP2
Return to 6502 Mode
Decrement
BNZ LOOP2
 Branch if Plus
Branch if no Carry
Branch if Carry SET
LOOP3 SUB
 Break
Branch if Minus ONE
Branch if not Minus ONE
Return from Sweet 16 Subroutine
 LDA #ADRH
STA IND+1 LDA OPTBL,X
STA IND JMP
Page
Page
 Sweet 16 Introduction
Page
 Source
 Input Enter String a $ , a $
DSP
Print Dbload Sweet REM Ctrl D
NVA
 Call -605 Return REM XAM8 in Monitor
Poke 776 , a REM Poke Destination
Print Print Goto
Sweet
 Mneml
MINI-ASSEMBLER
Baum
Mnemr
 SBC PCL Form ADDR-PC-2
 JSR Cout Position
 FORM7 STX A1H Save Index
 STA
ORG
CLC
BNE
 Norm LDA EXP1 ZERO?
 Shift Dividend Left
 Floating Point Package
Floating Point Representation LOW
 Floating Point Representation Examples
Stored
High LOW EXP Mantissa
Number Exponent Mantissa
 Floating Point Subroutine Descriptions
Page
Page
Page
Page
 Calling Sequence
STY Init MANT1 LDY
STY
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
 CMP
YES,RETURN with MANT1 Normalized
Right Shift MANT1 or Swap with MANT2 on Carry
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
 Fsub
LOG
Fadd
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
 Toutfl
Tapdel
Hsbdry
Lstcom
 =UBRKVC
Outvec
Urcvec
=UIRQVC
 TAX
ADC
 ORA
Stocom STA
 BPL HASHUS+2
 Restore Except A,F
 CPX
BEQ
STX
JMP
 Outxah PHA
Exwrap RTS
Chksad PHP
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
 Dftxfr LDX
Newdev LDA
 LDA Toutfl
 8BFF 0D
 Msfirst
 Bufadh
Ddrdig
LOADT2
 STA Mode
 BNE Lcerr Last Char not
 Kgettr LDA
 H8DFF
 BCC PACKT3
 DMPT1A LDA
Dumpt
DUMPT1 TXA
DUMPT4 LDY
 Outbth LDX
 Register Name Patch
Outcht STX
 HS Tape Boundary
 Uddra
Rockwell International
Udrah
Nowln
 Movad
Oldlen
Length
TMASK1 =MOVAD
 Tabuff
Curpos
Checksum
TABUF2
 Write Edge Detect Control not Used Because KB
 CRB
EQS
 DB TO,EQS
CFD2A0A0A0A0
 SEI Disable Interrupt
 RS6 JSR Crlow Clear Display
 E1AC Have Valid Command
 Nxtadd TYA
Space Comm
 For
LOAD1A LDA
 LOADK5 LDX
 JMP LOADK5 Next
 E46A EE INC Bkflg SET FLG
 Outcks LDA
OUTCK1 PHA
 Dumpta LDX
DUMPT1 LDA
 E5EA
 TOGTA1 LDA
 TOGTA2 LDA
 BCC JD3
 MSG
 Whereo LDY
 ANY Other
CPY
 STA Outflg
 Output PHA
Outall PHA
 ROL Priflg Restore FLG
 Wrax JSR Numa
 EAA3 CA DEX
 Memerr JSR
 STA STIY+2
 Dehalf LDA
 EC5E 4A LSR Only ROW
 Onekey LDA
Debkey LDX
 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
 NEW Print ROW
Newcol LDA
 Ckbuff LDA
Bkcksm LDA
 OUTTA1 PHA
OUTTA2 LDX
 F2E1 3E7E7F3E7F7FCOL0
Zero Leftmost Column
 DB BGYU76HN
 MNNDX1 LSR
Rtmode
Getfmt TAX
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
 Tryjmp LDA
IMMED1 LDX
 OPCMP1 LDA
Brnchc JMP
Convrt LDA
 FORMD2 LDX
Brcomp LDA
Compbr LDX
 Backwd LDA
Forwrd LDA
 MATCH1 JMP
Curead TXA
 PATCH4 LDX CURPO2 Dont do Anything if 8D
 PATC15 JSR Crlf Decode Command
 Bkcksm
Addblk
ADDS1A
Brcomp
 CRA
 Goerr
 Namo E8CF NAMO1
 RD2 EA5D RD1
 AIM 65 Microcomputer Monitor Program Listing
E6AC
 Table of Contents
AIM 65 Microcomputer Basic Language Reference Manual
Introduction
 Memory SIZE?
Installing Basic in the AIM ROM Installation Procedure
Entering Basic
WIDTH?
 Basic Cursor
Exiting Basic
Reentering Basic
Printer Control
 Getting Started with Basic Basic Command SET
ASC
CHR$
 Operating on Programs and Lines
Direct and Indirect Commands Direct Commands
Indirect Commands
Listing a Program
 Deleting a Program
Deleting a Line
Replacing a Line
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
 Relational Tests
Program Using Relations
Remarks
Input B
 AN Improved Square Root Program
Looping
Square Root Program
Print Nsqrn
 COUNT-BACKWARD Program
Another Square Root Program
Print Nsqrn Next N
Some Other Looping Operations
 Matrix Operations
Print What is the Number
Print I,J Next Next J
Sort Program
 Print Must be Integer
Print BAD GUESS, TRY Again Restore
Input N
Stopping a Program
 LEN Function
Strings
$=ROCKWELL R6500 Print A$ Rockwell R6500
Print LENA$,LENMICROCOMPUTER
 RIGHT$ Function
MID$ Function
 CHR$ Function
Print B$ Basic for Rockwell R6500
Print C$ Basic FOR-ROCKWELL-R6500 VAL and Strs Functions
Data AIM 65,DOG
 Input Input X$
Additional String Considerations
Name Example PURPOSE/USE DIM
Print Print X$
 Cntl Print
Operators Symbol Sample Statement
ESC
Print X/1.3
 Symbol Sample Statement PURPOSE/USE
Negation
Relational Operators
 Not If not Q3 then
Operator Argument Result Not
 Alert
Commands
Print Intruder Alert
Statement SYNTAX/FUNCTION Example Clear
 Statement SYNTAX/FUNCTION Load
Statement SYNTAX/FUNCTION FRE
Statement SYNTAX/FUNCTION List
Statement SYNTAX/FUNCTION NEW
 Program Statements
Statement SYNTAX/FUNCTION Example RUN
Statement SYNTAX/FUNCTION Example Save
Statement SYNTAX/FUNCTION Example DEF
 Statement SYNTAX/FUNCTION DIM
Statement SYNTAX/FUNCTION END
Statement SYNTAX/FUNCTION For
 Statement SYNTAX/FUNCTION IF...GOTO
Statement SYNTAX/FUNCTION Gosub
Statement SYNTAX/FUNCTION Goto
Statement SYNTAX/FUNCTION IF...THEN
 Statement SYNTAX/FUNCTION Next
If X0 then Print ERROR, X Negative Goto Example
Statement SYNTAX/FUNCTION LET
Statement SYNTAX/FUNCTION ON...GOSUB
 Example Restore Return
Statement SYNTAX/FUNCTION Restore
Symbol SYNTAX/FUNCTION Wait
Statement SYNTAX/FUNCTION Return
 Statement SYNTAX/FUNCTION Print
Statement SYNTAX/FUNCTION Input
Statement SYNTAX/FUNCTION POS
Print Value ISA
 Statement SYNTAX/FUNCTION TAB
Statement SYNTAX/FUNCTION Read
Statement SYNTAX/FUNCTION SPC
String Functions Statement SYNTAX/FUNCTION ASC
 Statement SYNTAX/FUNCTION MID$
Statement SYNTAX/FUNCTION LEFT$
Statement SYNTAX/FUNCTION LEN
Statement SYNTAX/FUNCTION RIGHT$
 Statement SYNTAX/FUNCTION COS
Arithmetic Functions Statement SYNTAX/FUNCTION ABS
Statement SYNTAX/FUNCTION ATN
Statement SYNTAX/FUNCTION EXP
 Statement SYNTAX/FUNCTION Example SIN
Statement SYNTAX/FUNCTION Example SGN
Print Sgnx
Print Sinx
 Error Messages
?XX Error
Inverse Hyperbolic Secant
 TAB, SPC
Space Hints
PRINTX,Y,Z
 Storage Allocation Information
Speed Hints
 OLD AIM
This is Probably the Most Important Speed Hint
Converting Basic Programs not Written for AIM 65 Basic
OLD
 NUL
Assembly Language Subroutines
Ascii Character Codes Decimal
SOH
 Inputnumbern
Address Content
$AE
Printx
 Recording on Cassette Using the Basic Save Command
RUN NUMBER?
Storing AIM 65 Basic Programs on Cassette
 OUT=T F=FNAME T=
Cassette Operations Using the AIM 65 Editor
OUT=T F=
IN=
 OF9C
ATN Implementation
Entered by Alter Memory M
0FAC
 WIDTH? Bytes Free AIM 65 Basic
Saving ATN Object Code on Cassette