Appendix B

These maps, primarily the work of Jun Butterfield, all originally appeared in COMPUTE! Magazine. (See the copyright page for references.)

Map 1 . PET Original And Upgrade BASIC.

ORIG    UPGR    DESCRIPTION
C357    C355    ?OUT OF MEMORY
C359    C357    Send BASIC error message
C38B    C389    Warm start, BASIC
C3AC    C3AB    Crunch & insert line
C430    C439    Fix chaining & READY
C433    C442    Fix chaining
C48D    C495    Crunch tokens
C522    C52C    Find line in BASIC
C553    C55D    Do NEW
C56A    C572    Do CLR
C59A    C5A7    Reset BASIC to start
C6B5    C6C4    Continue BASIC execution
C863    C873    Get fixed-point number from BASIC
C9CE    C9DE    Send Return, LF if in screen mode
C9D2    C9E2    Send Return, Linefeed
CA27    CA1C    Print string
CA2D    CA22    Print precomputed string
CA49    CA45    Print character
CE11    CDF8    Check for comma
CE13    CDFA    Check for specific character
CE1C    CE03    'SYNTAX ERROR'
D079    D069    Bump Variable Address by 2
D0A7    D09A    Float to Fixed conversion
D278    D26D    Fixed to Float conversion
D679    D67B    Get byte to X reg
D68D    D68F    Evaluate String
D6C4    D6C6    Get two parameters
D73C    D773    Add (from memory)
D8FD    D934    Multiply by memory location
D9B4    D9EE    Multiply by ten
DA74    DAAE    Unpack memory variable to Accum #1
DBIB    DB55    Completion of Fixed to Float conversion
DC9F    DCD9    Print fixed-point value
DCA9    DCE3    Print floating-point value
DCAF    DCE9    Convert number to ASCII string
E3EA    E3D8    Print a character
na      E775    Output byte as 2 hex digits
na      E7A7    Input 2 hex digits to A
na      E7B6    Input 1 hex digit to A
F0B6    F0B6    Send 'talk' to IEEE

F0BA    F0BA    Send 'listen' to IEEE
F12C    F128    Send Secondary Address
E7DE    F156    Send canned message
F167    F16F    Send character to IEEE
F17A    F17F    Send'untalk'
F17E    F183    Send 'unlisten'
F187    F18C    Input from IEEE
F2C8    F2A9    Close logical file
F2CD    F2AE    Close logical file in A
F32A    F301    Check for Stop key
F33F    F315    Send message if Direct mode
na      F322    LOAD subroutine
F3DB    F3E6    ?LOAD ERROR
F3E5    F3EF    Print READY & reset BASIC to start
F3FF    F40A    Print SEARCHING ...
F411    F41D    Print file name
F43F    F447    Get LOAD/SAVE type parameters
F462    F466    Open IEEE channel for output
F495    F494    Find specific tape header block
F504    F4FD    Get string
F52A    F521    Open logical file from input parameters
F52D    F524    Open logical file
F579    F56E    ?FILE NOT FOUND, clear I!O
F57B    F570    Send error message
F5AE    F5A6    Find any tape header block
F64D    F63C    Get pointers for tape LOAD
F667    F656    Set tape buffer start address
F67D    F66C    Set cassette buffer pointers
F6E6    F6F0    Close IEEE channel
F78B    F770    Set input device from logical file number
F7DC    F7BC    Set output device from LFN
F83B    F812    PRESS PLAY..; wait
F87F    F855    Read tape to buffer
F88A    F85E    Read tape
F8B9    F886    Write tape from buffer
F8C1    F883    Write tape, leader length in A
F913    F8E6    Wait for I/O complete or Stop key
FBDC    FB76    Reset tape 1/O pointer

FD1B    FC9B    Set interrupt vector
FFC6    FFC6    Set input device
FFC9    FFC9    Set output device
FFCC    FFCC    Restore default I/0 devices
FFCF    FFCF    Input character
FFD2    FFD2    Output character
FFE4    FFE4    Get character


Map 2. Upgrade PET/CBM Map.

0000-0002    0-2     USR Jump instruction
0003         3       Search character
0004         4       Scan-between-quotes flag
0005         5       BASIC input buffer pointer; #subscripts
0006         6       Default DIM flag
0007         7       Type: FF=string, 00=numeric
0008         8       Type: 80=integer, 00=floating point
0009         9       DATA scan flag; LIST quote flag;
                     memory flag
000A        10       Subscript flag; FNx flag
000B        11       0=input; 64=get; 152=read
000C        12       ATN sign flag; comparison evaluation flag
000D        13       input flag; suppress output if negative
000E        14       current I/0 device for prompt-suppress
0011-0012   17-18    BASIC integer address (for SYS, GOTO, etc.)
0013        19       Temporary string descriptor stack pointer
0014-0015   20-21    Last temporary string vector
0016-001E   22-30    Stack of descriptors for temporary strings
001F-0020   31-32    Pointer for number transfer
0021-0022   33-34    Misc. number pointer
0023-0027   35-39    Product staging area for multiplication
0028-0029   40-41    Pointer: Start-of-BASIC memory
002A-002B   42-43    Pointer: End-of-BASIC, Start-of-Variables
002C-002D   44-45    Pointer: End-of-Variables, Start-of-Arrays
002E-002F   46-47    Pointer: End-of-Arrays
0030-0031   48-49    Pointer: Bottom-of-strings (moving down)
0032-0033   50-51    Utility string pointer
0034-0035   52-53    Pointer: Limit of BASIC Memory
0036-0037   54-55    Current BASIC line number
0038-0039   56-57    Previous BASIC line number
003A-003B   58-59    Pointer to BASIC statement (for CONT)
003C-003D   60-61    Line number, current DATA line
003E-003F   62-63    Pointer to current DATA item
0040-0041   64-65    Input vector
0042-0043   66-67    Current variable name
0044-0045   68-69    Current variable address
0046-0047   70-71    Variable pointer for FOR/NEXT

0048           72    Y save register; new-operator save
004A           74    Comparison symbol accumulator
00413-004C  75-76    Misc. numeric work area
004D-0050   77-80    Work area; garbage yardstick
0051-0053   81-83    Jump vector for functions
0054-0058   84-88    Misc. numeric storage area
0059-005D   89-93    Misc. numeric storage area
005E-0063   94-99    Accumulator#1:E,M,M,M,M,S
0064          100    Series evaluation constant pointer
0065          101    Accumulator hi-order propagation word
0066-00613  102-107  Accumulator #2
006C          108    Sign comparison, primary vs. secondary
006D          109    low-order rounding byte for Acc #1
006E-006F    110-111 Cassette buffer length/Series pointer
0070-0087    112-135 Subrtn: Get BASIC Char; 77,78 =pointer
0088-008C    136-140 RND storage and work area
008D-008F    141-143 Jiffy clock for TI and TI$
0090-0091    144-145 Hardware interrupt vector
0092-0093    146-147 Break interrupt vector
0094-0095    148-149 NMI interrupt vector
0096          150    Status word ST
0097          151    Which key depressed: 255 = no key
0098          152    Shift key: 1 if depressed
0099-009A    153-154 Correction clock
009B          155    Keyswitch PIA: STOP and RVS flags
009C          156    Timing constant buffer
009D          157    Load = 0, Verify =1
009E          158    #characters in keyboard buffer
009F          159    Screen reverse flag
00A0          160    IEEE-488 mode
00A1          161    End-of-line-for-input pointer
00A3-00A4    163-164 Cursor log (row, column)
00A5          165    PBD image for tape I/O
00A6          166    Key image
00A7          167    0=flashing cursor, else no cursor
00A8          168    Countdown for cursor timing
00A9          169    Character under cursor
00AA          170    Cursor blink flag

00AB          171    EOT bit received
00AC          172    Input from screen/input from keyboard
00AD          173    X save flag
00AE          174    How many open files
00AF          175    Input device, normally 0
00B0          176    Output CMD device, normally 3
00B1          177    Tape character parity
00B2          178    Byte received flag
00B4          180    Tape buffer character
00B5          181    Pointer in file name transfer
00B7          183    Serial bit count
00B9          185    Cycle counter
00BA          186    Countdown for tape write
00BB          187    Tape buffer #1 count
00BC          188    Tape buffer #2 count
00BD          189    Write leader count; Read pass 1/pass 2
00BE          190    Write new byte, Read error flag
00BF          191    Write start bit; Read bit seq error
00C0          192    Pass 1 error log pointer
00C1          193    Pass 2 error correction pointer
00C2          194    0=Scan; 1-15=Count; $40=Load; $80=End
00C3          195    Checksum
00C4-0005 196-197    Pointer to screen line
00C6          198    Position of cursor on above line
00C7-0008 199-200    Utility pointer: tape buffer, scrolling
00C9-000A 201-202    Tape end address/end of current program
00CB-000C 203-204    Tape timing constants
00CD          205    00=direct cursor, else programmed cursor
00CE          206    Timer 1 enabled for tape read; 00 =disabled
00CF          207    EOT signal received from tape
00D0          208    Read character error
00D1          209    # characters in file name
00D2          210    Current logical file number
00D3          211    Current secondary addrs, or R/VV command
00D4          212    Current device number
00D5          213    Line length (40 or 80) for screen
00D6-00D7 214-215    Start of tape buffer, address
00D8          216    Line where cursor lives
00B9          217    Last key input, buffer checksum; bit buffer
00DA-00DB 218-219    File name pointer
00DC          220    Number of keyboard INSERTs outstanding
00DD          221    Write shift word/Receive input character
00DE          222    # blocks remaining to write/read
00DF          223    Serial word buffer
00E0-00F8 224-248    Screen line table: hi order address & line wrap
00F9          249    Cassette #1 status switch
00FA          250    Cassette #2 status switch
00FB-00FC 251-252    Tape start address
0100-010A 256-266    Binary to ASCII conversion area
0100-013E 256-318    Tape read error log for correction
0100-01FF 256-511    Processor stack area
0200-0250 512-592    BASIC input buffer
0251-025A 593-602    Logical file number table
025B-0264 603-612    Device number table
0265-026E 613-622    Secondary address, or R/W cmd, table
026F-0278 623-632    Keyboard input buffer
027A-0339 634-825    Tape #1 buffer
033A-03F9 826-1017   Tape #2 buffer
03FA-03FB 1018-1019  Vector for Machine Language Monitor
0400-7FFF 1024-32767   Available RAM including expansion
8000-8FFF 32768-36863  Video RAM
9000-BFFF 36864-49151  Available ROM expansion area
0000-E0F8 49152-57592  Microsoft BASIC interpreter
E0F9-E7FF 57593-59391  Keyboard, Screen, Interrupt programs
E810-E813 59408-59411  PIA1- Keyboard 1/0
E820-E823 59424-59427  PIA2 - IEEE-488 1/0
E840-E84F 59456-59471  VIA - I/O and Timers
F000-FFFF 61440-65535  Reset, tape, diagnostic monitor

Map 3. PET/CBM 4.0 BASIC. Zero Page.

Hex     Decimal    Description
0000-0002 0-2      USR jump
0003       3       Search character
0004       4       Scan-between-quotes flag
0005       5       Input buffer pointer; 11 of subscripts
0006       6       Default DIM flag
0007       7       Type: FF=string, 00=numeric
0008       8       Type: 80=integer, 00=floating point
0009       9       Flag: DATA scan; LIST quote; memory
000A      10       Subscript flag; FNX flag
000B      11       0=INPUT; $40=GET; $98=READ
000C      12       ATN sign/Comparison Evaluation flag
000D-000F 13-15    Disk status DS$ descriptor
0010      16       Current I/0 device for prompt-suppress
0011-0012 17-18    Integer value (for SYS, GOTO etc)
0013-0015 19-21    Pointers for descriptor stack
0016-001E 22-30    Descriptor stack(temp strings)
001E-0022 31-34    Utility pointer area
0023-0027 35-39    Product area for multiplication
0028-0029 40-41    Pointer: Start-of-Basic
002A-002B 42-43    Pointer: Start-of-Variables
002C-002D 44-45    Pointer: Start-of-Arrays
002E-002F 46-47    Pointer: End-of-Arrays
0030-0031 48-49    Pointer: String-storage(moving down)
0032-0033 50-51    Utility string pointer
0034-0035 52-53    Pointer: Limit-of-memory
0036-0037 54-55    Current Basic line number
0038-0039 56-57    Previous Basic line number
003A-003B 58-59    Pointer: Basic statement for CONT
003C-003D 60-61    Current DATA line number
003E-003F 62-63    Current DATA address
0040-0041 64-65    Input vector
0042-0043 66-67    Current variable name
0044-0045 68-69    Current variable address
0046-0047 70-71    Variable pointer for FOR/NEXT
0048-0049 72-73    Y-save; op-save; Basic pointer save
004A         74    Comparison symbol accumulator
004B-0050 75-80    Misc work area, pointers, etc
0051-0053 81-83    Jump vector for functions
0054-005D 84-93    Misc numeric work area
005E         94    Accumlll: Exponent
005F-0062 95-98    Accumlll: Mantissa
0063         99    Accumlll: Sign
0064        100    Series evaluation constant pointer
0065        101    Accumlll hi-order (overflow)
0066-006B 102-107  Accumlll: Exponent, etc.
006C        108    Sign comparison, Acc#1 vs #2
006D        106    Accumlll to-order (rounding)
006E-006F 110-111    Cassette buff len/Series pointer
0070-0087 112-135    CHRGET subroutine; get Basic char
0077-0078 119-120    Basic pointer (within subrtn)
0088-008C 136-140    Random number seed.
008D-008F 141-143    Jiffy clock for TI and TI$
0090-0091 144-145    Hardware interrupt vector
0092-0093 146-147    BRK interrupt vector
0094-0095 148-149    NMI interrupt vector
0096          150    Status word ST
0097          151    Which key down; 255=no key
0098          152    Shift key: 1 if depressed
0099-009A 153-154    Correction clock
009B          155    Keyswitch PIA: STOP and RVS flags
009C          156    Timing constant for tape
009D          157    Load=0, Verify=1
009E          158    Number of characters in keybd buffer
009F          159    Screen reverse flag
00A0          160    IEEE output; 255=character pending
00A1          161    End-of-line-for-input pointer
00A3-00A4 163-164    Cursor log (row, column)
00A5          165    IEEE output buffer
00A6          166    Key image
00A7          167    0=flash cursor
00A8          168    Cursor timing countdown
00A9          169    Character under cursor
00AA          170    Cursor in blink phase
00AB          171    EOT received from tape
00AC          172    Input from screen/from keyboard
00AD          173    X save
00AE          174    How many open files
00AF          175    Input device, normally 0
00B0          176    Output CMD device, normally 3
00B1          177    Tape character parity
00B2          178    Byte received flag
00B3          179    Logical Address temporary save
00B4          180    Tape buffer character; MLM command
00B5          181    File name pointer; MLM flag, counter
00B7          183    Serial bit count
00B9          185    Cycle counter
00BA          186    Tape writer countdown
00BB-00BC 187-188    Tape buffer pointers, 111 and 112
00BD          189    Write leader count; read passl/2
00BE          190    Write new byte; read error flag
00BF          191    Write start bit; read bit seq error
00C0-0001 192-193    Error log pointers, passl/2
00C2          194    0=Scan/1-15=Count/$40=Load/$80=End
00C3          195    Write leader length; read checksum
00C4-0005 196-197    Pointer to screen line
00C6          198    Position of cursor on above line
00C7-00C8 199-200    Utility pointer: tape, scroll
00C9-00CA 201-202    Tape end addrs/End of current program
00CB-00CC 203-204    Tape timing constants
00CD          205    0=direct cursor, else programmed
00CE          206    Tape read timer 1 enabled
00CF          207    EOT received from tape
00D0          208    Read character error
00D1          209    11 characters in file name
00D2          210    Current file logical address
00D3          211    Current file secondary addrs
00D4          212    Current file device number
00D5          213    Right-hand window or line margin
00D6-00D7 214-215    Pointer: Start of tape buffer
00D8          216    Line where cursor lives
00D9          217    Last key/checksum/misc.
00DA-00DB 218-219    File name pointer
00DC          220    Number of INSERTs outstanding
00DD          221    Write shift word/read character in
00DE          222    Tape blocks remaining to write/read
00DF          223    Serial word buffer
00E0-00F8 224-248    (40-column) Screen line wrap table
00E0-00E1 224-225    (80-column) Top, bottom of window
00E2          226    (80-column) Left window margin
00E3          227    (80-column) Limit of keybd buffer
00E4          228    (80-column) Key repeat flag
00E5          229    (80-column) Repeat countdown
00E6          230    (80-column) New key marker
00E7          231    (80-column) Chime time
00E8          232    (80-column) HOME count
00E9-00EA 233-234    (80-column) Input vector
00EB-00EC 235-236    (80-column) Output vector
00F9-00FA 249-250    Cassette status, 111 and 112
00FB-00FC 251-252    MLM pointer/Tape start address
00FD-00FE 253-254    MLM, DOS pointer, misc.
0100-010A 256-266    STR$ work area, MLM work
0100-013E 256-318    Tape read error log
0100-0lFF 256-511    Processor stack
0200-0250 512-592    MLM work area; Input buffer
0251-025A 593-602    File logical address table
025B-0264 603-612    File device number table
0265-026E 613-622    File secondary adds table
026E-0278 623-632    Keyboard input buffer
027A-0339 634-825    Tape#1 input buffer
033A-03F9 826-1017   Tape#2 input buffer
033A          826    DOS character pointer
033B          827    DOS drive 1 flag
033C          828    DOS drive 2 flag
033D          829    DOS length/write flag
033E          830    DOS syntax flags
033F-0340 831-832    DOS disk ID
0341          833    DOS command string count
0342-0352 834-850    DOS file name buffer
0353-0380 851-896    DOS command string buffer
03EE-03F7 1006-1015  (80-column) Tab stop table
03FA-03FB 1018-1019  Monitor extension vector
03FC         1020    IEEE timeout defeat
0400-7FFF 1024-32767 Available RAM including expansion
8000-83FF 32768-33791 (40-column) Video RAM
8000-87FF 32768-34815 (80-column) Video RAM
9000-AFFF 36864-45055 Available ROM expansion area
B000-DFFF 45056-57343 Basic, DOS, Machine Lang Monitor
E000-E7FF 57344-59391 Screen, Keyboard, Interrupt programs
E810-E813 59408-59411 PIA 1 - Keyboard 1/0
E820-E823 59424-59427 PIA 2 - IEEE-488 1/0
E840-E84F 59456-59471 VIA - I/O and timers
E880-E881 59520-59521 (80-column) CRT Controller
F000-FFFF 61440-65535 Reset, I/O handlers, Tape routines

Map 4. PET/CBM 4.0 BASIC ROM Routines.

                 Description
B000-B065 Action addresses for primary keywords
B066-B093 Action addresses for functions
B094-B0B1 Hierarchy and action addresses for operators
B0B2-B20C Table of Basic keywords
B20D-B321 Basic messages, mostly error messages
B322-B34F Search the stack for FOR or GOSUB activity
B350-B392 Open up space in memory
B393-B39F Test: stack too deep?
B3A0-B3CC Check available memory
B3CD      Send canned error message, then:
B3FF-B41E Warm start; wait for Basic command
B41F-B4B5 Handle new Basic line input
B4B6-B4E1 Rebuild chaining of Basic lines
B4E2-B4FA Receive line from keyboard
B4FB-B5A2 Crunch keywords into Basic tokens
B5A3-B5D1 Search Basic for given line number
B5D2      Perform NEW, and;
B5EC-B621 Perform CLR
B622-B62F Reset Basic execution to start
B630-B6DD Perform LIST
B6DE-B784 Perform FOR
B785-B7B6 Execute Basic statement
B7B7-B7C5 Perform RESTORE
B7C6-B7ED Perform STOP or END
B7EE-B807 Perform CONT
B808-B812 Perform RUN
B813-B82F Perform GOSUB
B830-B85C Perform GOTO
B85D      Perform RETURN, then:
B883-B890 Perform DATA: skip statement
B891      Scan for next Basic statement
B894-B8B2 Scan for next Basic line
B8B3      Perform IF, and perhaps:
B8C6-B8D5 Perform REM: skip line
B8D6-B8F5 Perform ON
B8F6-B92F Accept fixed-point number
B930-BA87 Perform LET
BA88-BARD Perform PRINT#
BA8E-BAA1 Perform CMD
BAA2-BB1C Perform PRINT
BB1D-BB39 Print string from memory
BB3A-BB4B Print single format character
BB4C-BB79 Handle bad input data
BB7A-BBA3 Perform GET
BBA4-BBBD Perform INPUT#
BBBE-BBF4 Perform INPUT
BBF5-BC01 Prompt and receive input
BC02-BCF6 Perform READ
BCF7-BD18 Canned Input error messages
BD19-BD71 Perform NEXT
BD72-BD97 Check type mismatch
BD98      Evaluate expression
BEE9      Evaluate expression within parentheses
BEEF      Check parenthesis, comma
BF00-BF0B Syntax error exit
BF8C-C046 Variable name setup
C047-C085 Set up function references
C086-C0B5 Perform OR, AND
C0B6-C11D Perform comparisons
C11E-C12A Perform DIM
C12B-ClBF Search for variable
ClC0-C2C7 Create new variable
C2C8-C2D8 Setup array pointer
C2D9-C2DC 32768 in floating binary
C2DD-C2FB Evaluate integer expression
C2FC-C4A7 Find or make array
C4A8    Perform FRE, and:
C4BC-C4C8 Convert fixed-to-floating
C4C9-C4CE Perform POS
C4CF-C4DB Check not Direct
C4DC-C509 Perform DEF
C50A-C51C Check FNx syntax
C51D-C58D Evaluate FNx
C58E-C59D Perform STR$
C59E-C5AF Do string vector
C5B0-C61C Scan, set up string
C61D-C669 Allocate space for string
C66A-C74E Garbage collection
C74F-C78B Concatenate
C78C-C7B4 Store string
C7B5-C810 Discard unwanted string
C811-C821 Clean descriptor stack
C822-C835 Perform CHR$
C836-C861 Perform LEFT$
C862-C86C Perform RIGHT$
C86D-C896 Perform MID$
C897-C8B1 Pull string data
C8B2-C8B7 Perform LEN
C8B8-C8C0 Switch string to numeric
C8C1-C8D0 Perform ASC
C8D1-C8E2 Get byte parameter
C8E3-C920 Perform VAL
C921-C92C Get two parameters for POKE or WAIT
C92D-C942 Convert floating-to-fixed
C943-C959 Perform PEEK
C95A-C962 Perform POKE
C963-C97E Perform WAIT
C97F-C985 Add 0.5
C986      Perform subtraction
C998-CA7C Perform addition
CA7D-CAB3 Complement accum#1
CAB4-CAB8 Overflow exit
CAB9-CAF1 Multiply-a-byte
CAF2-CB1F Constants
CB20      Perform LOG
CB5E-CBC1 Perform multiplication
CBC2-CBEC Unpack memory into accumli2
CBED-CC09 Test & adjust accumulators
CC0A-CC17 Handle overflow and underflow
CC18-CC2E Multiply by 10
CC2F-CC33 10 in floating binary
CC34      Divide by 10
CC3D      Perform divide-by
CC45-CCD7 Perform divide-into
CCD8-CCFC Unpack memory into accum#1
CCFD-CD31 Pack accum411 into memory
CD32-CD41 Move accum412 to #1
CD42-CD50 Move accum111 to #2
CD51-CD60 Round accum#1
CD61-CD6E Get accum#1 sign.
CD6F-CD8D Perform SGN
CD8E-CD90 Perform ABS
CD91-CDD0 Compare accum#1 to memory
CDDl-CE01 Floating-to-fixed
CE02-CE28 Perform INT
CE29-CEB3 Convert string to floating-point
CEB4-CEE8 Get new ASCII digit
CEE9-CEF8 Constants
CF78      Print IN, then:
CF7F-CF92 Print Basic line li
CF93-D0C6 Convert floating-point to ASCII
D0C7-D107 Constants
D108      Perform SQR
D112      Perform power function
D14B-D155 Perform negation
D156-D183 Constants
D184-D1D6 Perform EXP
D1D7-D220 Series evaluation
D221-D228 RND constants
D229-D281 Perform RND
D282      Perform COS
D289-D2D1 Perform SIN
D2D2-D2FD Perform TAN
D2FE-D32B Constants
D32C-D35B Perform ATN
D35C-D398 Constants
D399-D3B5 CHRGET sub for zero page
D3B6-D471 Basic cold start
D472-D716 Machine Language Monitor
D717-D7AB MLM subroutines
D7AC-D802 Perform RECORD
D803-D837 Disk parameter checks
D838-D872 Dummy disk control messages
D873-D919 Perform CATALOG or DIRECTORY
D91A-D92E Output
D92F-D941 Find spare secondary address
D942-D976 Perform DOPEN
D977-D990 Perform APPEND
D991-D9D1 Get disk status
D9D2-DA06 Perform HEADER
DA07-DA30 Perform DCLOSE
DA31-DA64 Set up disk record
DA65-DA7D Perform COLLECT
DA7E-DAA6 Perform BACKUP
DAA7-DAC6 Perform COPY
DAC7-DAD3 Perform CONCAT
DAD4-DB0C Insert command string values
DB0D-DB39 Perform DSAVE
DB3A-DB65 Perform DLOAD
DB66-DB98 Perform SCRATCH
DB99-DBgD Check Direct command
DB9E-DBD6 Query ARE YOU SURE?
DBD7-DBE0 Print BAD DISK
DBE1-DBF9 Clear DS$ and ST
DBFA-DC67 Assemble disk command string
DC68-DE29 Parse Basic DOS command
DE2C-DE48 Get Device number
DE49-DE86 Get file name
DE87-DEgC Get small variable parameter
** Entry points only for E000-E7FF **
E000      Register/screen initialization
E0A7      Input from keyboard
E116      Input from screen
E202      Output character
E442      Main Interrupt entry
E455      Interrupt: clock, cursor, keyboard
E600      Exit from Interrupt
**                                **
F000-F0D1 File messages
F0D2      Send 'Talk'
F0D5      Send 'Listen'
F0D7      Send IEEE command character
F109-F142 Send byte to IEEE
F143-F150 Send byte and clear ATN
F151-F16B Option: timeout or wait
F16C-F16F DEVICE NOT PRESENT
F170-F184 Timeout on read, clear control lines
F185-F192 Send canned file message
F193-F19D Send byte, clear control lines
F19E-FlAD Send normal (deferred) IEEE char
F1AE-F1BF Drop IEEE device
F1C0-F204 Input byte from IEEE
F205-F214 GET a byte
F215-F265 INPUT a byte
F266-F2A1 Output a byte
F2A2      Abort files
F2A6-F2C0 Restore default I/0 devices
F2C1-F2DC Find/setup file data
F2DD-F334 Perform CLOSE
F335-F342 Test STOP key
F343-F348 Action STOP key
F349-F350 Send message if Direct mode
F351-F355 Test if Direct mode
F356-F400 Program load subroutine
F401-F448 Perform LOAD
F449-F46C Print SEARCHING
F46D-F47C Print LOADING or VERIFYING
F47D-F4A4 Get Load/Save parameters
F4A5-F4D2 Send name to IEEE
F4D3-F4F5 Find specific tape header
F4F6-F50C Perform VERIFY
F50D-F55F Get Open/Close parameters
F560-F5E4 Perform OPEN
F5E5-F618 Find any tape header
F619-F67A Write tape header
F67B-F694 Get start/end addrs from header
F695-F6AA Set buffer address
F6AB-F6C2 Set buffer start & end addrs
F6C3-F6CB Perform SYS
F6CC-F6DC Set tape write start & end
F6DD-F767 Perform SAVE
F768-F7AE Update clock
F7AF-F7FD Connect input device
F7FE-F84A Connect output device
F84B-F856 Bump tape buffer pointer
F857-F879 Wait for PLAY
F87A-F88B Test cassette switch
F88C-F899 Wait for RECORD
F89A      Initiate tape read
F8CB      Initiate tape write
F8E0-F92A Common tape I/0
F92B-F934 Test I/0 complete
F935-F944 Test STOP key
F945-F975 Tape bit timing adjust
F976-FAgB Read tape bits
FA9C-FBBA Read tape characters
FBBB-FBC3 Reset tape read address
FBC4-FBC8 Flag error into ST
FBC9-FBD7 Reset counters for new byte
FBD8-FBF3 Write a bit to tape
FBF4-FC85 Tape write
FC86-FCBF Write tape leader
FCC0-FCDA Terminate tape; restore interrupt
FCDB-FCEA Set interrupt vector
FCEB-FCF8 Turn off tape motor
FCF9-FD0A Checksum calculation
FD0B-FD15 Advance load/save pointer
FD16-FD4B Power-on Reset
FD4C-FD5C Table of interrupt vectors
** Jump table:                **
FF93-FF9E CONCAT,DOPEN,DCLOSE,RECORD
FF9F-FFAA HEADER,COLLECT,BACKUP,COPY
FFAB-FFB6 APPEND,DSAVE,DLOAD,CATALOG
FFB7-FFBC RENAME,SCRATCH
FFBD      Get disk status
FFC0      OPEN
FFC3      CLOSE
FFC6      Set input device
FFC9      Set output device
FFCC      Restore default I/0 devices
FFCF      INPUT a byte
FFD2      Output a byte
FFD5      LOAD
FFD8      SAVE
FFDB      VERIFY
FFDE      SYS
FFE1      Test stop key
FFE4      GET byte
FFE7      Abort all files
FFEA      Update clock
FFFA-FFFF Hard vectors: NMI, Reset, INT

Map 5. VIC Zero Page And BASIC ROMs.

Hex           Decimal  Description
0000-0002       0-2    USR jump
0003-0004       3-4    Float-Fixed vector
0005-0006       5-6    Fixed-Float vector
0007              7    Search character
0008              8    Scan-quotes flag
0009              9    TAB column save
000A             10    O=LOAD, 1=VERIFY
000B             11    Input buffer pointer/# subscrpt
000C             12    Default DIM flag
000D             13    Type: FF=string, 00=numeric
000E             14    Type: 80=integer, 00=floating point
000F             15    DATA scan/LIST quote/memry flag
0010             16    Subscript/FNx flag
0011             17    0=INPUT;$40=GET;$98=READ
0012             18    ATN sign/Comparison eval flag
0013             19    Current I/0 prompt flag
0014-0015     20-21    Integer value
0016             22    Pointer: temporary strg stack
0017-0018     23-24    Last temp string vector
0019-0021     25-33    Stack for temporary strings
0022-0025     34-37    Utility pointer area
0026-002A     38-42    Product area for multiplication
002B-002C     43-44    Pointer: Start-of-Basic
002D-002E     45-46    Pointer: Start-of-Variables
002F-0030     47-48    Pointer: Start-of-Arrays
0031-0032     49-50    Pointer: End-of-Arrays
0033-0034     51-52    Pointer: String-storage(moving down)
0035-0036     53-54    Utility string pointer
0037-0038     55-56    Pointer: Limit-of-memory
0039-003A     57-56    Current Basic line number
003B-003C     59-60    Previous Basic line number
003D-003E     61-62    Pointer: Basic statement for CONT
003F-0040     63-64    Current DATA line number
0041-0042     65-66    Current DATA address
0043-0044     67-68    Input vector
0045-0046     69-70    Current variable name
0047-0048     71-72    Current variable address
0049-004A     73-74    Variable pointer for FOR/NEXT
004B-004C     75-76    Y-save; op-save; Basic pointer save
004D             77    Comparison symbol accumulator
004E-0053     78-83    Misc work area, pointers, etc
0054-0056     84-86    Jump vector for functions
0057-0060     87-96    Misc numeric work area
0061             97    Accum41: Exponent
0062-0065    98-101    Accum#1: Mantissa
0066            102    Accum#1: Sign
0067            103    Series evaluation constant pointer
0068            104    Accum41 hi-order (overflow)
0069-006E   105-110    Accum#2: Exponent, etc.
006F            111    Sign comparison, Acc#1 vs #2
0070            112    Accum#i to-order (rounding)
0071-0072   113-114    Cassette buff len/Series pointer
0073-008A   115-138    CHRGET subroutine; get Basic char
007A-007B   122-123    Basic pointer (within subrtn)
008B-008F   139-143    RND seed value
0090            144    Status word ST
0091            145    Keyswitch PTA: STOP and RVS flags
0092            146    Timing constant for tape
0093            147    Load=O, Verify=1
0094            148    Serial output: deferred char flag
0095            149    Serial deferred character
0096            150    Tape EOT received
0097            151    Register save
0098            152    How many open files
0099            153    Input device, normally 0
009A            154    Output CMD device, normally 3
009B            155    Tape character parity
009C            156    Byte-received flag
009D            157    Direct=$80/RUN=0 output control
009E            158    Tp Pass 1 error log/char buffer
009F            159    Tp Pass 2 err log corrected
00A0-00A2   160-162    Jiffy Clock HML
00A3            163    Serial bit count/EOI flag
00A4            164    Cycle count
00A5            165    Countdown,tape write/bit count
00A6            166    Tape buffer pointer
00A7            167    Tp Wrt ldr count/Rd pass/inbit
00A8            168    Tp Wrt new byte/Rd error/inbit cnt
00A9            169    Wrt start bit/Rd bit err/stbit
00AA            170    Tp Scan;Cnt;Ld;End/byte assy
00AB            171    Wr lead length/Rd checksum/parity
00AC-00AD   172-173    Pointer: tape bufr, scrolling
00AE-00AF   174-175    Tape end adds/End of program
00B0-00B1   176-177    Tape timing constants
00B2-00B3   178-179    Pntr: start of tape buffer
00B4            180    1=Tp timer enabled; bit cnt
00B5            181    Tp EOT/RS232 next bit to send
00B6            182    Read character error/outbyte buf
00B7            183    # characters in file name
00B8            184    Current logical file
00B9            185    Current secndy address
00BA            186    Current device
00BB-00BC   167-188    Pointer to file name
00BD            189    Wr shift word/Rd input char
00BE            190    # blocks remaining to Wr/Rd
00BF            191    Serial word buffer
00C0            192    Tape motor interlock
00C1-0002   193-194    1/0 start adds
00C3-0004   195-196    Kernel setup pointer
00C5            197    Last key pressed
00C6            198    # chars in keybd buffer
00C7            199    Screen reverse flag
00C8            200    End-of-line for input pointer
00C9-000A   201-202    Input cursor log (row, column)
00CB            203    Which key: 64 if no key
00CC            204    0=flash cursor
00CD            205    Cursor timing countdown
00CE            206    Character under cursor
00CF            207    Cursor in blink phase
00D0            208    Input from screen/from keyboard
00D1-00D2   209-210    Pointer to screen line
00D3            211    Position of cursor on above line
00D4            212    0=direct cursor, else programmed
00D5            213    Current screen line length
00D6            214    Row where cursor lives
00D7            215    Last inkey/checks um/buffer
00D8            216    # of INSERTS outstanding
00D9-00F0   217-240    Screen line link table
00F1            241    Dummy screen link
00F2            242    Screen row marker
00F3-00F4   243-244    Screen color pointer
00F5-00F6   245-246    Keyboard pointer
00F7-00F8   247-248    RS-232 Rev pntr
00F9-00FA   249-250    RS-232 Tx pntr
00FF-010A   255-266    Floating to ASCII work area
FF8A-FFF5 65418-65525 Jump Table, Including:
FFC6 - Set Input channel
FFC9 - Set Output channel
FFCC -- Restore default I/O channels
FFCF - INPUT
FFD2 - PRINT
FFE1 - Test Stop key
FFE4 - GET

c000    ROM control vectors
c00c    Keyword action vectors
c052    Function vectors
c080    Operator vectors
c09e    Keywords
cl9e    Error messages
c328    Error message vectors
c365    Miscellaneous messages
c38a    Scan stack for FOR/GOSUB
c3b8    Move memory
c3fb    Check stack depth
c408    Check memory space
c435    'OUT CF MEMORY'
c437    Error routine
c469    Break entry
c474    'READY.'
c480    Ready for Basic
c49c    Handle new line
c533    Re-chain lines
c560    Receive input line
c579    Crunch tokens
c613    Find Basic line
c642    Perform [NEW]
c65e    Perform [CLR]
c68e    Back up text pointer
c69c    Perform [LISTj
c742    Perform [FOR]
c7ed    Execute statement
c81d    Perform [RESTORE]
c82c    Break
c82f    Perform [STOP]
c831    Perform [END]
c857    Perform [CONT]
c871    Perform [RUN]
c883    Perform [GOSUB]
c8a0    Perform [GOTO]
c8d2    Perform [RETURN]
c8f8    Perform [DATA]
c906    Scan for next statement
c928    Perform [IF]
c93b    Perform [REM]
c94b    Perform [ON]
c96b    Get fixed point number
c9a5    Perform [LET]
ca80    Perform [PRINT#]
ca86    Perform [CMD]
caa0    Perform [PRINT]
cble    Print message from (y,a)
cb3b    Print format character
cb4d    Bad-input routines
cb7b    Perform [GET]
cba5    Perform [INPUT#]
cbbf    Perform [INPUT]
cbf9    Prompt & input
cc06    Perform [READ]
ccfc    Input error messages
Idle    Perform [NEXT]
cd78    Type-match check
cd9e    Evaluate expression
cea8    Constant - PI
cef1    Evaluate within brackets
cef7    Check for ') '
ceff    Check for comma
cf08    Syntax error
ef14    Check range
cf28    Search for variable
cfa7    Set up FN reference
cfe6    Perform [OR]
cfe9    Perform [AND]
d016    Compare
d081    Perform [DIM]
d08b    Locate variable
d113    Check alphabetic
dlld    Create variable
d194    Array pointer subroutine
dla5    Value 32768
dlb2    Float-fixed conversion
dldl    Set up array
d245    'BAD SUBSCRIPT'
d248    'ILLEGAL QUANTITY'
d34c    Compute array size
d37d    Perform [FRE]
d391    Fixed-float conversion
d39e    Perform [POS]
d3a6    Check direct
d3b3    Perform [DEF]
d3e1    Check FN syntax
d3f4    Perform [FN]
d465    Perform [STR$]
d475    Calculate string vector
d487    Set up string
d4f4    Make room for string
d526    Garbage collection
d5bd    Check salvageability
d606    Collect string
d63d    Concatenate
d67a    Build string to memory
d6a3    Discard unwanted string
d6db    Clean descriptor stack
d6ec    Perform [CHR$]
d700    Perform [LEFT$]
d72c    Perform [RIGHT$]
4737    Perform [MID$]
d761    Pull string parameters
d77c    Perform [LEN]
4782    Exit string-mode
d78b    Perform [ASC]
d79b    Input byte parameter
d7ad    Perform [VAL]
d7eb    Get params for poke/wait
d7f7    Float-fixed
d80d    Perform [PEEK]
d824    Perform [POKE]
d82d    Perform [WAIT]
d849    Add 0.5
d850    Subtract-from
d853    Perform [SUBTRACT]
d86a    Perform [ADD]
d947    Complement fac#1
d97e    'OVERFLOW'
d983    Multiply by zero byte
d9ea    Perform [LOG]
da2b    Perform [MULTIPLY]
da59    Multiply-a-bit
da8c    Memory to FAC#2
dab7    Adjust FAC#1/#2
dad4    Unde rf low/overflow
dae2    Multiply by 10
daf9    +10 in floating pt
dafe    Divide by 10
db12    Perform [DIVIDE]
dba2    Memory to fac#1
dbc7    FAC#1 to memory
dbfc    FAC#2 to fac#1
dc0c    FAC#1 to FAC#2
dclb    Round FAC#1
dc2b    Get sign
dc39    Perform [SGN]
dc58    Perform [ABS]
dc5b    Compare FAC#1 to mem
dc9b    Float-fixed
dccc    Perform [ INT]
dcf3    String to fac
dd7e    Get ascii digit
dddd    Float to ascii
df16    Decimal constants
df3a    TI constants
df71    Perform [SQR]
df7b    Perform [POWER]
dfb4    Perform [NEGATIVE]
dfed    Perform [EXP]
e040    Series evaluate 1
e056    Series evaluate 2
e094    Perform [RND]
e0f6    ?? Breakpoints ??
e127    Perform    [ SYS ]
e153    Perform [SAVE]
e162    Perform [VERIFY]
e165    Perform [LOAD]
elbb    Perform [OPEN]
elc4    Perform [CLOSE]
eldl    Parameters for load/save
e203    Check default parameters
e20b    Check for comma
e216    Parameters for open/close
e261    Perform [COS]
e268    Perform [SIN]
e2b1    Perform [TAN]
e30b    Perform [ATN]
e378    Initialize
e387    CHRGET for zero page
e3a4    Initialize Basic
e429    Power-up message
e44f    Vectors for $300
e45b    Initialize vectors
e467    Warm restart
e476    Program patch area
e4a0    Serial output '1'
e4a9    Serial output 101
e4b2    Get serial input & clock
e4bc    Program patch area
e500    Set 6522 addrs
e505    Set screen limits
e50a    Track cursor location
e518    Initalize I/0
e54c    Normalize screen
e55f    Clear screen
e581    Home cursor
e587    Set screen pointers
e5bb    Set I/o defaults
e5c3    Set vic chip defaults
e5cf    Input from keyboard
e64f    Input from screen
e6b8    Quote mark test
e6c5    Set up screen print
e6ea    Advance cursor
e715    Retreat cursor
e72d    Back into previous line
e742    Output to screen
e8c3    Go to next line
e8d8    Do 'RETURN'
e8e8    Check line decrement
e8fa    Check line increment
e912    Set colour code
e921    Colour code table
e929    Code conversion
e975    Scroll screen
e9ee    Open space on screen
ea56    Move screen line
ea6e    Synch colour transfer
ea7e    Set start-of-line
ea8d    Clear screen line
eaal    Print to screen
eaaa    Store on screen
eab2    Synch colour to char
eabf    Interrupt (IRQ)
eble    Check keyboard
ec00    Set text mode
ec46    Keyboard vectors
ec5e    Keyboard maps
ed21    Graphics/text control
ed30    Set graphics mode
ed5b    Wrap up screen line
ed6a    Shifted key matrix
eda3    Control key matrix
ede4    Vic chip defaults
edfd    Screen line adds low
ee14    Send 'talk'
ee17    Send 'listen'
eelc    Send control char
ee49    Send to serial bus
eeb7    Timeout on serial
eec0    Send listen SA
eec5    Clear ATN
eece    Send talk SA
eee4    Send serial deferred
eef6    Send    ' untal k'
ef04    Send 'unlisten'
ef19    Receive from serial bus
ef84    Clock line on
ef84    Clock line off
ef96    Delay 1 ms
efa3    RS232 send (NMI)
efee    New RS232 byte send
f016    Error or quit
f027    Compute bit count
f036    RS232 receive (NMI)
f05b    Setup to receive
f09d    Receive parity error
f0a2    Receive overrun error
f0a5    Receive break error
f0a8    Receive frame error
f0b9    Bad device
f0bc    File to RS232
f0ed    Send to RS232 buffer
f116    Input from RS232 buffer
f14f    Get from RS232 buffer
f160    Check serial bus idle
f174    Messages
fle2    Print if direct
flf5    Get..
f205    ..from RS232
f20e    Input
f250    Get.. tape/serial/RS232
f27a    Output..
f290    ..to tape
f2c7    Set input device
f309    Set output device
f34a    Close
f3cf    Find file
f3df    Set file values
f3ef    Abort all files
f3f3    Restore default I/0
f40a    Do file opening
f495    Send SA
f4c7    Open RS232
f542    Load program
f647    'SEARCHING'
f659    Print file name
f66a    'LOADING/VERIFYING'
f675    Save program
f728    'SAVING'
f734    Bump clock
f760    Get time
f767    Set time
f770    Action stop key
f77e    File Error Messages
f7af    Find any tape header
f7e7    Write tape header
f84d    Get buffer address
f854    Set buffer start,
        end pointers
f867    Find specific header
f88a    Bump tape pointer
f894    'PRESS PLAY .. '
f8ab    Check cassette status
f8b7    'PRESS RECORD ..'
f8c0    Initiate tape read
f8e3    Initiate tape write
f8f4    Common tape read/write
f94b    Check tape stop
f95d    Set timing
f98e    Read bits (IRQ)
faad    Store characters
fbd2    Reset pointer
fbdb    New tape character setup
fbea    Toggle tape
fc06    Data write
fc0b    Tape write    (IRQ)
fc95    Leader write (IRQ)
fccf    Restore vectors
fcf6    Set vector
fd08    Kill motor
fdll    Check read/write pointer
fdlb    Bump read/write pointer
fd22    Powerup entry
fd3f    Check A-rom
fd52    Set kernal2
fd8d    Initialize system constants
fdfl    IRQ vectors
fdf9    Initialize I/0 regs
fe49    Save data name
fe50    Save file details
fe57    Get status
fe66    Flag ST
fe6f    Set timeout
fe73    Read/set top of memory
fe82    Read/set bottom of memory
fe91    Test memory location
fea9    NMI interrupt entry
fed2    RESET/STOP warm start
fede    NMI RS232 sequences
ff56    Restore & exit
ff5c    RS232 timing table
ff72    Main IRQ entry
ff8a    Jumbo jump table
fffa    Hardware vectors

Map 6. Commodore 64 Memory Map.

(figure)

(figure)

(figure)

(figure)

(figure)

(figure)

64 Memory Map

Hex       Decimal   Description
0000        0       Chip directional register
0001        1       Chip I/0; memory & tape control
0003-0004   3-4     Float-Fixed vector
0005-0006   5-6     Fixed-Float vector
0007        7       Search character
0008        8       Scan-quotes flag
0009        9       TAB column save
000A       10       0=LOAD, 1=VERIFY
000B       11       Input buffer pointer/# subscrpt
000C       12       Default DIM flag
000D       13       Type: FF=string, 00=numeric
000E       14       Type: 80=integer, 00=floating point
000F       15       DATA scan/LIST quote/memry flag
0010       16       Subscript/FNx flag
0011       17       0=INPUT;$40=GET;$98=READ
0012       18       ATN sign/Comparison eval flag
0013       19       Current I/O prompt flag
0014-0015  20-21    Integer value
0016       22       Pointer: temporary strg stack
0017-0018  23-24    Last temp string vector
0019-0021  25-33    Stack for temporary strings
0022-0025  34-37    Utility pointer area
0026-002A  38-42    Product area for multiplication
002B-002C  43-44    Pointer: Start-of-Basic
002D-002E  45-46    Pointer: Start-of-Variables
002F-0030  47-48    Pointer: Start-of-Arrays
0031-0032  49-50    Pointer: End-of-Arrays
0033-0034  51-52    Pointer: String-storage(moving down)
0035-0036  53-54    Utility string pointer
0037-0038  55-56    Pointer: Limit-of-memory
0039-003A  57-58    Current Basic line number
003B-003C  59-60    Previous Basic line number
003D-003E  61-62    Pointer: Basic statement for CONT
003F-0040  63-64    Current DATA line number
0041-0042  65-66    Current DATA address
0043-0044  67-68    Input vector
0045-0046  69-70    Current variable name
0047-0048  71-72    Current variable address
0049-004A  73-74    Variable pointer for FOR/NEXT
004B-004C  75-76    Y-save; op-save; Basic pointer save
004D       77        Comparison symbol accumulator
004E-0053  78-83    Misc work area, pointers, etc
0054-0056  84-86    Jump vector for functions
0057-0060  87-96    Misc numeric work area
0061       97       Accum#1: Exponent
0062-0065  98-101   Accum#1: Mantissa
0066      102       Accum#1: Sign
0067      103       Series evaluation constant pointer
0068      104       Accum#1 hi-order (overflow)
0069-006E 105-110   Accum#2: Exponent, etc.
006F      111       Sign comparison, Acc#1 vs #2
0070      112       Accum#1 to-order (rounding)
0071-0072 113-114   Cassette buff len/Series pointer
0073-008A 115-138   CHRGET subroutine; get Basic char
007A-007B 122-123   Basic pointer (within subrtn)
008B-008F 139-143   RND seed value
0090      144       Status word ST
0091      145       Keyswitch PIA: STOP arid RVS flags
0092      146       Timing constant for tape
0093      147       Load=O, Verify=1
0094      148       Serial output: deferred char flag
0095      149       Serial deferred character
0096      150       Tape EOT received
0097      151       Register save
0098      152       How many open files
0099      153       Input device, normally 0
009A      154       Output CMD device, normally 3
009B      155       Tape character parity
009C      156       Byte-received flag
009D      157       Direct=$80/RUN=0 output control
009E      158       Tp Pass 1 error log/char buffer
009F      159       Tp Pass 2 err log corrected
00A0-00A2 160-162   Jiffy Clock HML
00A3      163       Serial bit count/EOI flaq
00A4      164       Cycle count
00A5      165       Countdown,tape write/bit count
00A6      166       Tape buffer pointer
00A7      167       Tp Wrt ldr count/Rd pass/inbit
00A8      168       Tp Wrt new byte/Rd error/inbit cnt
00A9      169       Wrt start bit/Rd bit err/stbit
00AA      170       Tp Scan;Cnt;Ld;End/byte assy
00AB      171       Wr lead length/Rd checksum/parity
00AC-00AD 172-173   Pointer: tape bufr, scrolling
00AE-00AF 174-175   Tape end adds/End of program
00B0-00B1 176-177   Tape timing constants
00B2-00B3 178-179   Pntr: start of tape buffer
00B4      180       1=Tp timer enabled; bit count
00B5      181       Tp EOT/RS232 next bit to send
00B6      182       Read character error/outbyte buf
00B7      183       # characters in file name
00B8      184       Current logical file
00B9      185       Current secndy address
00BA      186       Current device
00BB-00BC 187-188   Pointer to file name
00BD      189       Wr shift word/Rd input char
00BE      190       # blocks remaining to Wr/Rd
00BF      191       Serial word buffer
00C0      192       Tape motor interlock
00C1-0002 193-194   I/O start address
00C3-0004 195-196   Kernel setup pointer
00C5      197       Last key pressed
00C6      198       # chars in keybd buffer
00C7      199       Screen reverse flag
00C8      200       End-of-line for input pointer
00C9-000A 201-202   Input cursor log (row, column)
00CB      203       Which key: 64 if no key
00CC      204       0=flash cursor
00CD      205       Cursor timing countdown
00CE      206       Character under cursor
00CF      207       Cursor in blink phase
00D0      208       Input from screen/from keyboard
00D1-00D2 209-210   Pointer to screen line
00D3      211       Position of cursor on above line
00D4      212       0=direct cursor, else programmed
00D5      213       Current screen line length
00D6      214       Row where curosr lives
00D7      215       Last inkey/checksum/buffer
00D8      216       # of INSERTS outstanding
00D9-00F2 217-242   Screen line link table
00F3-00F4 243-244   Screen color pointer
00F5-00F6 245-246   Keyboard pointer
00F7-00F8 247-248   RS-232 Rcv pntr
00F9-00FA 249-250   RS-232 Tx pntr
00FF-010A 255-266   Floating to ASCII work area
0100-013E 256-318   Tape error log
0100-01FF 256-511   Processor stack area
0200-0258 512-600   Basic input buffer
0259-0262 601-610   Logical file table
0263-026C 611-620   Device # table
026D-0276 621-630   Sec Adds table
0277-0280 631-640   Keybd buffer
0281-0282 641-642   Start of Basic Memory
0283-0284 643-644   Top of Basic Memory
0285      645       Serial bus timeout flag
0286      646       Current color code
0287      647       Color under cursor
0288      648       Screen memory page
0289      649       Max size of keybd buffer
028A      650       Repeat all keys
028B      651       Repeat speed counter
028C      652       Repeat delay counter
028D      653       Keyboard Shift/Control flag
028E      654       Last shift pattern
028F-0290 655-656   Keyboard table setup pointer
0291      657       Keyboard shift mode
0292      658       0=scroll enable
0293      659       RS-232 control reg
0294      660       RS-232 command reg
0295-0296 661-662   Bit timing
0297      663       RS-232 status
0298      664       # bits to send
0299-029A 665       RS-232 speed/code
029B      667       RS232 receive pointer
029C      668       RS232 input pointer
029D      669       RS232 transmit pointer
029F      670       RS232 output pointer
029F-02A0 671-672   IRQ save during tape I/0
02A1      673       CIA 2 (NMI) Interrupt Control
02A2      574       CIA 1 Timer A control log
02A3      675       CIA 1 Interrupt Log
02A4      676       CIA 1 Timer A enabled flag
02A5      677       Screen row marker
02C0-02FE 704-766   (Sprite 11)
0300-0301 768-769   Error message link
0302-0303 770-771   Basic warm start link
0304-0305 772-773   Crunch Basic tokens link
0306-0307 774-775   Print tokens link
0308-0309 776-777   Start new Basic code link
030A-030B 778-779   Get arithmetic element link
030C      780       SYS A-reg save
030D      781       SYS X-rea save
030E      782       SYS Y-reg save
030F      783       SYS status reg save
0310-0312 784-785   USR function jump         (8248)
0314-0315 788-789   Hardware interrupt vector (EA31)
0316-0317 790-791   Break interrupt vector    (FE66)
0318-0319 792-793   NMI interrupt vector      (FE47)
031A-031B 794-795   OPEN vector               (F34A)
031C-031D 796-797   CLOSE vector              (F291)
031E-031F 798-799   Set-input vector          (F20E)
0320-0321 800-801   Set-output vector         (F250)
0322-0323 802-803   Restore 1/0 vector        (F333)
0324-0325 804-805   INPUT vector              (F157)
0326-0327 806-807   Output vector             (F1CA)
0328-0329 808-809   Test-STOP vector          (FEED)
032A-032B 810-811   GET vector                (F13E)
032C-032D 812-813   Abort I/0 vector          (F32F)
032E-032F 814-815   Warm start vector         (FE66)
0330-0331 816-817   LOAD link                 (F4A5)
0332-0333 818-819   SAVE link                 (F5ED)
033C-03FB 828-1019  Cassette buffer
0340-037E 832-894   (Sprite 13)
0380-03BE 896--958  (Sprite 14)
0300-03FE 960-1022  (Sprite 15)
0400-07FF 1024-2047 Screen memory
0800-9FFF 2048-40959  Basic RAM memory
8000-9FFF 32768-40959 Alternate: ROM plug-in area
A000-BFFF 40960-49151 ROM: Basic
A000-BFFF 49060-49151 Alternate: RAM
0000-CFFF 49152-53247 RAM memory, including alternate
D000-D02E 53248-53294 Video Chip (6566)
D400-D41C 54272-54300 Sound Chip (6581 SID)
D800-DBFF 55296-56319 Color nybble memory
D000-DC0F 56320-56335 Interface chip 1, IRQ (6526 CIA)
DD00-DD0F 56576-56591 Interface chip 2, NMI (6526 CIA)
D000-DFFF 53248-57343 Alternate: Character set
E000-FFFF 57344-65535 ROM: Operating System
E000-FFFF 57344-65535 Alternate: RAM
FF81-FFF5 65409-65525 Jump Table, Including:
FFC6 - Set Input channel
FFC9 - Set Output channel
FFCC - Restore default I/0 channels
FFCF - INPUT
FFD2 - PRINT
FFE1 - Test Stop key
FFE4 - GET

Map 7. Atari Memory.

        ;
        ;PAGE ZERO RAM ASSIGNMENTS
        ;
0000    LINZBS =    $0000    ;LINBUG RAM (WILL BE REPLACED BY MONITOR RAM)
        ; 
        ;THESE LOCATIONS ARE NOT CLEARED
0002    CASINI =    $0002    ;CASSETTE INIT LOCATION
0004    RAMLO  =    $0004    ;RAM POINTER FOR MEMORY TEST
0006    TRAMSZ =    $0006    ;TEMPORARY REGISTER FOR RAM SIZE
0007    TSTDAT =    $0007    ;RAM TEST DATA REGISTER
        ; 
        ;CLEARED ON COLD START ONLY
0008    WARMST =    $0008    ;WARM START FLAG
0009    BOOTQ  =    $0009    ;SUCCESSFUL BOOT FLAG <WAS BOOT?>
000A    DOSVEC =    $000A    ;DISK SOFTWARE START FLAG
000C    DOSINI =    $000C    ;DISK SOFTWARE INIT ADDRESS
000E    APPMHI =    $000E    ;APPLICATIONS MEMORY HI LIMIT
        ;   
        ;CLEARED ON A COLD OR WARM START
0010    INTZBS =    $0010    ;INTERRUPT HANDLER
0010    POKMSK =    $0010    ;SYSTEM MASK FOR POKEY IRQ HANDLER
0011    BRKKEY =    $0011    ;BREAK KEY FLAG
0012    RTCLOCK =   $0012    ;REAL TIME CLOCK (IN 16 MSEC UNITS)
        ;
0015    BUFADR =    $0015    ;INDIRECT BUFFER ADDRESS REGISTER
        ;
0017    ICCOMT =    $0017    ;COMMAND FOR VECTOR
        ;
0018    DSKFMS =    $0018    ;DISK FILE MANAGER POINTER
        ;
001A    DSKUTL =    $001A    ;DISK UTILITIES POINTER
001C    PTIMOT =    $001C    ;PRINTER TIME OUT REGISTER
001D    PBPNT  =    $0010    ;PRINTER BUFFER POINTER
001E    PBUFSZ =    $001E    ;PRINT BUFFER SIZE
001F    PTEMP  =    $001F    ;TEMPORARY REGISTER
        ;
0020    ZIOCB  =    $0020  ;ZERO PAGE 1/0 CONTROL BLOCK
0010    IOCBSZ =    16       ;NUMBER OF BYTES PER IOCB
0080    MAXIOC =    8'IOCBSZ    ;LENGTH OF THE IOCS AREA
0020    IOCBAS =    $0020
0020    ICHIDZ =    $0020    ;HANDLER INDEX NUMBER (FF == IOCB FREE)
0021    ICDNOZ =    $0021    ;DEVICE NUMBER (DRIVE NUMBER)
0022    ICCOMZ =    0022    ;COMMAND CODE
0023    ICSTAZ =    $0023    ;STATUS OF LAST IOCB ACTION
0024    IC9ALZ =    $0024    ;BUFFER ADDRESS LOW BYTE
0025    ICBAHZ =    $0025    ;BUFFER ADDRESS HIGH BYTE
0026    ICPTLZ =    $0026    ;PUT BYTE ROUTINE ADDRESS - 1
0027    ICPTHZ =    $0027
0028    ICBLLZ =    $0028    ;BUFFER LENGTH LOW BYTE
0029    ICBLHZ =    $0029
002A    ICAXIZ =    $002A    ;AUXILIARY INFORMATION FIRST BYTE
0028    ICAX2Z =    $0028
002C    ICSPRZ =    $002C    ;TWO SPARE BYTES (CIO LOCAL USE)
002E    ICIONO =    ICSPRZ+2    ;ICOB NUMBER X 16
002F    CIOCHR =    ICSPRZ+3    ;CHARACTER BYTE FOR CURRENT OPERATION
        ;
0030    STATUS =    $0030    ;INTERNAL STATUS STORAGE
0031    CHKSUM =    $0031    ;CHECKSUM (SINGLE BYTE SUM WITH CARRY)
0032    BUFRLO =    $0032    ;POINTER TO DATA BUFFER (LO BYTE)
0033    BUFRHI =    $0033    ;POINTER TO DATA BUFFER (HI BYTE)
0034    BFENLO =    $0034    ;NEXT BYTE PAST END OF DATA BUFFER (LO BYTE)
0035    BFENHI =    $0035    ;NEXT BYTE PAST END OF DATA BUFFER (HI BYTE)
0036    CRETRY =    $0036    ;NUMBER OF COMMAND FRAME RETRIES
0037    DRETRY =    $0037    ;NUMBER OF DEVICE RETRIES
0038    BUFRFL =    $0038    ;DATA BUFFER FULL FLAG
0039    RECVDN =    $0039    ;RECIEVE DONE FLAG
003A    XMTDON =    $003A    ;TRANSMISSION DONE FLAG
0038    CHKSNT =    $003B    ;CHECKSUM SENT FLAG
003C    NOCKSM =    $003C    ;NO CHECKSUM FOLLOWS DATA FLAG
        ;
        ;
003D    BPTR   =    $003D
003E    FTYPE  =    $003E
003F    FEOF   =    $003F
0040    FREQ   =    $0040
0041    SOUNDR =    $0041    ;NOISY I/0 FLAG (ZERO IS QUIET)
0042    CRITIC =    $0042    ;DEFINES CRITICAL SECTION (CRITICAL IF NON-ZERO)
        ;
0043    FMSZPG =    $0043    ;TOTAL OF 7 BYTES FOR DISK FILE MANAGER ZERO PAGE
        ;
        ;
004A    CKEY   =    $004A    ;FLAG SET WHEN GAME START PRESSED
0048    CASSBT =    $0048    ;CASSETTE BOOT FLAG
004C    DSTAT  =    $004C    ;DISPLAY STATUS
        ;
004D    ATRACT =    $004D    ;ATRACT FLAG
004E    DRKMSK =    $C04E    ;DARK ATRACT FLAG
004E    COLORH =    $004F    ;ATRACT COLOR SHIFTER (EOR'D WITH PLAYFIELD COLORS)
        ;
        ;LEDGE =    2    ;LMARGN'S VALUE AT COLD START
        ;REDGE =    39   ;
0050    TMPf,HR =   $0050
0051    HOLD1 =     $0051
0052    LMARGN =    $0052    ;LEFT MARGIN (SET TO ONE AT POWER ON)
0053    RMARGN =    $0053    ;RIGHT MARGIN (SET TO ONE AT POWER ON)
0054    ROWCRS =    $0054    ;CURSOR COUNTERS
0055    COLCRS =    $0055
0057    DINDEX =    $0057
0058    SAVMSC =    $0058
005A    OLDROW =    $005A
005B    OLDCOL =    $0058
005D    OLDCHR =    $005D    ;DATA UNDER CURSOR
005E    OLDADR =    $005E
0060    NEWROW =    $0060    ;POINT DRAW GOES TO
0061    NEWCOL =    $0061
0063    LOGCOL =    $0063    ;POINTS AT COLUMN IN LOGICAL LINE
0064    ADRESS =    $0064
0066    MLTTMP =    $0066
0068    SAVADR =    $0068
006A    RAMTOP =    $006A    ;RAM SIZE DEFINED BY POWER ON LOGIC
006B    BUFCNT =    $0068    ;BUFFER COUNT
006C    BUFSTR =    $006C    ;EDITOR GETCH POINTER
006E    BITMSK =    $006E    ;BIT MASK
        ;LOTS OF RANDOM TEMPS
0078    SWPFLG =    $0078    ;NON-0 IF TXT AND REGULAR RAM IS SWAPPED
007C    HOLDCH =    $007C    ;CH IS MOVED HERE IN KGETCH BEfore CNrL & SHIFT PROC
        ;
        ;
        ;
        ;80 - FF ARE FOR FP, USER, FMS AND DOS
        ;
        ;
        ;PAGE 1 -- STACK
        ;
        ;
        ;PAGE TWO RAM ASSIGNMENTS
        ;
0200    INTABS =    $0200    ;INTERRUPT RAM
0200    VDBLST =    $0200    ;DISPLAY LIST NMI VECTOR
0202    VPRCED =    $0202    ;PROCEED LINE IRQ VECTOR
0204    VINTER =    $0204    ;INTERRUPT LINE IRQ VECTOR
0206    VBREAK =    $0206    ;SOFTWARE BREAK (00) INSTRUCTION IRQ VECTOR
0208    VKEYBD =    $0208    ;POKEY KEYBOARD IRQ VECTOR
020A    VSERIN =    $020A    ;POKEY SERIAL INPUT READY IRQ
020C    VSEROR =    $020C    :POKEY SERIAL OUTPUT READY IRQ
020E    VSEROC =    $020E    ;POKEY SERIAL OUTPUT COMPLETE IRQ
0210    VTIMR1 =    $0210    ;POKEY TIMER 1 IRQ
0212    VTIMR2 =    $0212    ;POKEY TIMER 2 IRQ
0214    VTIMR4 =    $0214    ;POKEY TIMER 4 IRQ
0216    VIMIRQ =    $0216    ;IMMEDIATE IRQ VECTOR
0218    CDTMV1 =    $0218    ;COUNT DOWN TIMER 1
021A    CDTMV2 =    $021A    ;COUNT DOWN TIMER 2
021C    CDTMV3 =    $021C    ;COUNT DOWN TIMER 3
021E    CDTMV4 =    $021E    ;COUNT DOWN TIMER 4
0220    CDTMV5 =    $0220    ;COUNT DOWN TIMER 5
0222    VVBLKI =    $0222    ;IMMEDIATE VERTICAL BLANK NMI VECTOR
0224    VVBLKD =    $0224    ;DEFERRED VERTICAL BLANK NMI VECTOR
0226    CDTMA1 =    $0226    ;COUNT DOWN TIMER 1 JSR ADDRESS
0228    CDTMA2 =    $0228    ;Court DOWN TIMER 2 JSR ADDRESS
022A    CDTMF3 =    $022A    ;COUNT DOWN TIMER 3 FLAG
0228    SRTIMR =    $0228    ;SOFTWARE REPEAT TIMER
022C    CDTMF4 =    $022C    ;COUNT DOWN TIMER 4 FLAG
022E    CDTMF5 =    $022E    ;COUNT DOWN TIMER 5 FLAG
022E    SDMCTL =    $022F    ;SAVE DMACTL REGISTER
0230    SDLSTL =    $0230    ;SAVE DISPLAY LIST LOW BYTE
0231    SDLSTH =    $0231    ;SAVE DISPLAY LIST HIGH BYTE
0232    SSKCTL =    $0232    ;SKCTL REGISTER RAM
        ;
0234    LPENH  =    $0234    ;LIGHT PEN HORIZONTAL VALUE
0235    LPENV  =    $0235    ;LIGHT PEN VERTICAL VALUE

026F    GPRIOR =    $26F    ;Global priority cell


        ;
        ;
        ;POTENTIOMETERS
        ;
        ;
0270    PADDLO =    $0270
0271    PADDL1 =    $0271
0272    PADDL2 =    $0272
0273    PADDL3 =    $0273
0274    PADDL4 =    $0274
0275    PADDL5 =    $0275
0276    PADDLE =    $0276
0277    PADDL7 =    $0277
        ;
        ;
        ;JOYSTICKS
        ;
        ;
0278    STICK0 =    $0278
0279    STICK1 =    $0?79
027A    STICK2 =    $027A
027B    STICK3 =    $027B
        ;
        ;
        ;PADDLE TRIGGER
        ;
        ;
027C    PTRIGO =    $027f
027D    PTRIGI =    $027D
027E    PTRIG2 =    $027E
027E    PTRIG3 =    $027F
0280    PTRIG4 =    $0280
0281    PTRIG5 =    $0281
0282    PTRIG6 =    $0282
0283    PTRIG7 =    $0283
        ;
        ;
        ;JOYSTICK TRIGGER
        ;
        ;
0284    STRIGO =    $0284
0285    STRIGI =    $0285
0286    STRIG2 =    $0286
0287    STRIG3 =    $0287
        ;
        ;
        ;Many random OS variables, the following were commented
        ;
        ;
0290    TXTROW =    $0290    ;Text rowers
0291    TXTCOL =    $0291    ;Text colcrs
0293    TINDEX =    $0293    ;Text index
0294    TXTMSC =    $0294    ;fools convert into new msc
0296    TXTOLD =    $0296    ;oldrow and oldcol for text (etc.)
02A2    ESCFLG =    $02A2    ;Escape flan
0282    LOGMAP =    $0282    ;Logical line start bit map
0286    INVFLAG =   $0286    ;Inverse video flag (toggled by Atari key)
0287    FILFIG =    $0287    ;Fill flag for draw
0288    SCRFLG =    $02BB    ;Set if scroll occures
028E    SHFLOK =    $02BE    ;Shift lock
02BF    BOTSCR =    $02BF    ;Bottom of screen: 24 Norm, 4 Split,
        ;
        ;
        ;COLORS
        ;
        ;
02C0    PCOLRO =    $02C0    ;PO COLOR
02C1    PCOLRI =    $02CI    ;P1 COLOR
02C2    PCOLR2 =    $02C2    ;P2 COLOR
02C3    PCOLR3 =    $02C3    ;P3 COLOR
02C4    COLORO =    $02C4    ;COLOR 0
0205    COLORI =    $02C5    ;COLOR 1
02C6    COLOR2 =    $02C6    ;COLOR 2
02C7    COLOR3 =    $02C7    ;COLOR 3
0208    COLOR4 =    $02C8    ;COLOR 4
        ;
        ;
        ;GLOBAL VARIABLES
        ;
        ;
02E4    RAMSIZ =    $02E4    ;RAM SIZE (HI BYTE ONLY)
02E5    MEMTOP =    $02E5    ;TOP OF AVAILABLE USER MEMORY
02E7    MEMLO  =    $02E7    BOFTOM OF AVAILABLE USER MEMORY
02EA    DVSTAT =    $02EA    ;STATUS BUFFER
        ;
02F0    CRSINH =    $02FO    ;CURSOR INHIBIT (00 = CURSOR ON)
02F1    KEYDEL =    $02F1    ;Key delay
02F3    CHACT  =    $02F3    ;CHACTL REGISTER RAM
02F4    CHBAS  =    $02F4    ;CHBAS REGISTER RAM
02FD    FILDAT =    $02FD    ;RIGHT FILL DATA (DRAW)
02FB    ATACHR =    $02FB ;Atascii character
02FC    CH     =    $02FC    ;global variable for keyboard
02FE    DSPFLA =    $02FE    ;DISPLAY FLAG: DISPLAYS CNTLS IF NON ZERO;
02FF    SSFLAG =    $02FF    ;Start/stop flag for paging (CNTL 1). Cleared by Brea

        ;
        ;Page three RAM assignments
        ;
        ;
        ;Device control blocks
        ;(SIO)
0300    DCB    =    $0300    ;Device control block
0300    DDEVIC =    $0300    ;Peripheral Unit 1 bus I.D. number
0301    DUNIT  =    $0301    ;Unit number
0302    DCOMNO =    $0302    ;Bus command
0303    DSTATS =    $0303    ;Command Type/status return
0304    DBUFLO =    $0304    ;Data buffe pointe low
0305    DBUFHI =    $0305
0306    DTIMLO =    $0306    ;Device time out in 1 second units
0308    DBYTLO =    $0308    ;Number of bytes to be transvered low byte
0309    DBYTHI =    $0309
030A    DAUX1  =    $030A    ;Command Aux byte 1
030B    DAUX2  =    $030B
        ;
0340    IOCB   =    $0340
0340    ICHID  =    $0340    ;Handler index number (FF = IOCB free)
0341    ICDNO  =    $0341    ;Device number (drive number)
0342    ICCOM  =    $0342    ;Command code
0343    ICSTA  =    $0343    ;Status of last IOCB action
0344    ICBAL  =    $0344    ;Buffer address low byte
0345    ICBAH  =    $0345
0346    ICPTL  =    $0346    ;Put byte routine address - 1
0347    ICPTH  =    $0347
0348    ICBLL  =    $0348    ;Buffer length low byte
0349    ICBLH  =    $0349
034A    ICAX1  =    $034A    ;Auxiliary information first byte
0348    ICAX2  =    $0348
034C    ICSPR  =    $034C    ;four spare bytes
        ;
03C0    PRNBUF =    $03CO    ;Printer buffer (40 bytes)
        ;(21 spare bytes)
        ;
        ;Page Four Ram Assignments
03FD    CASBUF =    $03FD    ;Cassette Buffer (131 bytes)
0480    USAREA =    $0480    ; (0480 thru 05FF for the user)
                               (except for floating point...)
        ;
        ;FLOATING POINT ROM ROUTINES
        ;
        ;
        ;IF CARRY IS USED THEN CARRY CLEAR => NO ERROR, CARRY SET => ERROR
        ;
D800    AFP    =    $D800    ;ASCII -> FLOATING POINT (FP)
        ;INBUFF + CIX -> FRO, CIX, CARRY
D8E6    FASC   =    $DBE6    ;FP -> ASCII    FRO -> FOR,F00+1, CARRY
D9AA    IFP    =    $D9AA    ;INTEGER -> FP
        ;0-$FFFF (L.SB, MSB) IN FRO,FRO+1->FRO
D92D    FPI    =    $D92D    ;FP -> INTEGER FRO -> FRO,FRO+1, CARRY
DA60    FSUB   =    $DA60    ;FRO <- FRO - FR1, CARRY
DA66    FADD   =    $DA66    ;FRO <- FRO + FR1    CARRY
DADB    FMUL   =    $DADS    ;FRO <- FRO    FR1 CARRY
DB28    FDIV   =    $DB28    ;FRO <- FRO / FR1 CARRY
DD89    FLOOR  =    $DD89    ;FLOATING LOAD REGO    FRO <- (X,Y)
DD8D    FLDOP  =    $DD8D    FRO <- (FLPTR)
DD98    FLDlR  =    $DD98    FR1 <- (X,Y)
DD9C    FLDlP  =    $DD9C    FR1 <- (FLPTR)
DDA7    FSTOR  =    $DDA7    ;FLOATING STORE REGO (X,Y) <- FRO
DDAB    FSTOP  =    $DDAB    (FLTPTR)<- FRO
DDB6    FMOVE  =    $DDB6    ;FR1 <- FRO
DD40    PLYEVL =    $DD40    ;FRO <- P(Z) = SUM(I = N TO 0) (A(I) *Z**I)    CARRY

        ;INPUT:    (X,Y) = A(N), A(N-1) ...A(0) -> PLYARG
        ;ACC   = # OF COEFFICIENTS = DEGREE + 1
        ;FRO   = Z
DDC0    EXP    =    $DDCO    ;FRO <- E**FRO = EXP10(FRO * LOG10(E)) CARRY
DDCC    EXP10  =    $DDCC    ;FRO <- 10**FRO CARRY
DECD    LOG    =    $DECD    ;FRO <- LN(FRO) = LOG10(FRO) / LOG10(E) CARRY
DED1    LOG10  =    $DED1    ;FRO <- LOG10(FRO)    CARRY
        ;
        ;
        ;THE FOLLOWING ARE IN THE BASIC CARTRIDGE:
        ;
        ;
BD81    SIN    =    $BD81    ;FRO <- SIN(FRO) DEGFLG=O => RADS, 6=>DEG.    CARRY

BD73    COs    =    $BD73    ;FRO <- COS(FRO)    CARRY
BD43    ATAN   =    $B043    ;FRO <- ATN(FRO)    CARRY
BEB1    SQR    =    $BE61    ;FRO <- SQUAREROOT(FRO) CARRY
        ;
        ;
        ;FLOATING POINT ROUTINES ZERO PAGE (NEEDED ONLY IF F.P.
        ;ROUTINES ARE CALLED)
00D4    FRO    =    $00D4    ;FP REGO
00E0    FR1    =    $00E0    ;FP REG1
00F2    CIX    =    $00F2 ;CURRENT INPUT INDEX
00F3    INBUFF =    $00F3    ;POINTS TO USER'S LINE INPUT BUFFER
00FB    RADFLG =    $00FB    ;0 = RADIANS, 6 = DEGREES
00FC    FLTPTR =    $00FC    ;POINTS TO USERS FLOATING POINT NUMBER
        ;
        ;
        ;FLOATING POINT ROUTINES' NON-ZP RAM
        ;
        ;(057E to 05FF)

0580    LBUFF  =    $0580    ;LINE BUFFER
05EO    PLYARG =    LBUFF+$60    ;POLYNOMJLA ARGUMENTS
        ;
        ;
        ;
        ;
        ;
        ;
        ;
        ;COLLEEN MNEMONICS
        ;
        ;
        ;
D200    POKEY   =    $D200    ;VBLANK ACTION:    DESCRIPTION:
D200    POTO    =    POKEY+0    ;POT0-->PADDL0    0-227 IN RAM CELL
D201    POT1    =    POKEY+1    ;POT1-->PADDL1    0-227 IN RAM CELL
D202    POT2    =    POKEY+2    ;POT2-->PADDL2    0-227 IN RAM CELL
D203    POT3    =    POKEY+3    ;POT3-->PADDL3    0-227 IN RAM CELL
D204    POT4    =    POKEY+4    ;POT4-->PADDL4    0-227 IN RAM CELL
D205    POT5    =    POKEY+5    ;POT5-->PADDL5    0--227 IN RAM CELL
D206    POT6    =    POKEY+6    ;POT6-->PADDL6    0-22_7 IN RAM CELL
D207    POT7    =    POKEY+7    ;POT7-->PADDL7    0-227 IN RAM CELL
D208    ALLPOT  =    POKEY+8    ;???
D209    KBCODE  =    POKEY+9
D20A    RANDOM  =    POKEY+10
D20B    POTGO   =    POKEY+11    ;Strobed
        ;n/a
D20D    SERIN   =    POKEY+13
D20E    IRQST   =    POKEY+14
D20F    SKSTAT  =    POKEY+15
D200    AUDF1   =    POKEY+O
D201    AUDC1   =    POKEY+1
D202    AUDF2   =    POKEY+2
D203    AUDC2   =    POKEY+3
D204    AUDF3   =    POKEY+4
D205    AUDC3   =    POKEY+5
D206    AUDF4   =    POKEY+6
D207    AUDC4   =    POKEY+7
D208    AUDCT   =    POKEY+8    ;NONE    AUDCTL<--[SIO]
D209    STIMFR  =    POKEY+9
D20A    SKRES   =    POKEY+10 ;NONE    SKRES<--[SIO]
D208    POTGO   =    POKEY+11
D20D    SEROUT  =    POKEY+13    ;NONE    SEROUT<--[SIO]
D20E    IRQEN   =    POKEY+14    ;POKMSK-->IRQEN (AFFECTED BY OPEN S: OR E:)
D20F    SKCTL   =    POKEY+15    ;SSKCTL-->SKCTL    SSKCTL<--[SIO]
        ;
D000    CTIA   =    $D000
D000    HPOSPO =    CTIA+0
D001    HPOSPI =    CTIA+1
D002    HPOSP2 =    CTIA+2
D003    HPOSP3 =    CTIA+3
D004    HPOSMO =    CTIA+4
D005    HPOSMI =    CTIA+5
D006    HPOSM2 =    CTIA+6
D007    HPOSM3 =    CTIA+7
D008    SIZEPO =    CTIA+8
D009    SIZEP1 =    CTIA+9
D00A    SIZEP2 =    CTIA+10
D008    SIZEP3 =    CTIA+ll
D00C    SIZEM  =    CTIA+12
D00D    GRAFP0 =    CTIA+13
D00E    GRAFP1 =    CTIA+14
D00F    GRAFP2 =    CTIA+15
D010    GRAFP3 =    CTIA+16
D011    GRAFM  =    CTIA+17
D012    COLPMO =    CTIA+18    ;PCOLRO-->COLPMO    WITH ATTRACT MODE

D013    COLPM1 =    CTIA+19    ;ETC.N
D014    CGLPM2 =    CTIA+20
D015    COLPM3 =    CTIA+21
D016    COLPF0 =    CTIA+22
D017    COLPF1 =    CTIA+23
D018    COLPF2 =    CTIA+24
D019    COLPF3 =    CTIA+25
D01A    COLBK  =    CTIA+26
001B    PRIOR  =    CTIA+27
D01C    VDELAY =    CTIA+28
D01D    GRACTL =    CTIA+29
D01E    HITCLR =    CTIA+30
D0IF    CONSOL =    CTIA+31    ;$08-->CONSOL    TURN OFF SPEAKER

        ;
D000    MOPF   =    CTIA+0
D002    M2PF   =    CTIA+2
D003    M3PF   =    CTIA+3
D004    POPF   =    CTIA+4
0005    PIPF   =    CTIA+5
D006    P2PF   =    CTIA+6
D007    P3PF   =    CTIA+7
D008    MOPL   =    CTIA+8
D009    MlPL   =    CTIA+9
D00A    M2PL   =    CTIA+10
D008    M3PL   =    CTIA+11
D00C    POPL   =    CTIA+12
D00D    PlPL   =    CTIA+13
D00E    P2PL   =    CTIA+14
D00F    P3PL   =    CTIA+15
D010    TRIGO  =    CTIA+16    ;TRIGO-->STRIGI
D011    TRIG1  =    CTIA+17    ;ETC.
D012    TRIG2  =    CTIA+18
D013    TRIG3  =    CTIA+19
D014    PAL    =    CTIA+20
        ;
D400    ANTIC  =    $D400
D400    DMACTL =    ANTIC+0    ;DMACTL<--SDMCTL    ON OPEN S: OR E:

D401    CHARCTL =   ANTIC+1    ;CHACTL<--CHACT    ON OPEN S: OR E:

D402    DLISTL =    ANTIC+2    ;DLISTL<--SDLSTL    ON OPEN S: OR E:

D403    DLISTH =    ANTIC+3    ;DLISTH<--SDLSTH    ON OPEN S: OR E:

D404    HSCROL =    ANTIC+4
D405    VSCROL =    ANTIC+5
D407    PMBASE =    ANTIC+7
D409    CHBASE =    ANTIC+9    ;CHBASE<--CHBAS    ON OPEN S: OR E:
D40A    WSYNC  =    ANTIC+10
D40B    VCOUNT =    ANTIC+11
D40C    PENH   =    ANTIC+12
D40D    PENV   =    ANTIC+13
D40E    NMIEN  =    ANTIC+14    ;NMIEN<--40    POWER ON AND [SETVBV]
D40F    NMIRES =    ANTIC+15    ;STROBED
D40F    NMIST  =    ANTIC+15
E400    EDITRV =    $E400    ;EDITOR
E410    SCREEV =    $E410    ;TELEVISION SCREEN
E420    KEYBDV =    $E420    ;KEYBOARD
E430    PRINTV =    $E430    ;PRINTER
E440    CASETV =    $E440    ;CASSETTE
E459    SIOV   =    $E459    ;serial input output routine
E45C    SETVBV =    $E45C    ;set system timers routine
        ;With respect to SETVBV, the call sequence is
        ;X - MSB of vector/timer
        ;Y - LSB of vector/timer
        ;A - H of vector to hack
0001    SETMR1 =    1        ;Timer 1
0002    S11MR2 =    2       
;      2
0003    SCTMR3 =    3        ;      3
0004    SETMR4 =    4        ;      4
0005    SETMR5 =    5        ;      5
0006    SETIMM =    6        ;Immediate VBLANK
0007    SETDEF =    7        ;Deffered VBLANK
E45F    SYSVBV =    $E45F    ;SYSTEM VERTICAL BLANK CALCULATIONS
E462    XITVBL =    SE462    ;EXIT VERTICAL BLANK. CALCULATIONS
E466    SIOINV =    $E465    ;SERIAL INPUT OUTFUi INITIALIZATION

For Further Reference

Apple: What's Where In The Apple, William Luebbert, Micro Ink, Inc., 34 Chelmsford St., Chelmsford, MA 01824, 1981.

Atari: Mapping The Atari, Ian Chadwick, COMPUTE! Books, P.O. Box 5406, Greensboro, NC 27403, 1983. (This covers the operating system and provides lengthy cross-referenced explanations of Atari's memory addresses.)

Atari: The Atari BASIC Sourcebook, Bill Wilkinson, COMPUTE! Books, P.O. Box 5406, Greensboro, NC 27403, 1983. (Complete commented source code of Atari BASIC, with explanatory text.)


Return to Table of Contents | Previous Chapter | Next Chapter