Memory Map


MEM TYPE         SOURCE             HEX     DEC     USAGE
-------------------------------------------------------------------------------------------------------------------------
ROM              Monitor            $0000   0       Monitor kernal up to $0FFF
ROM              Monitor            $0003   3       Allow input of a line of text, store at (DE). Two lines max.
ROM              Monitor            $0006   6       Carriage return
ROM              Monitor            $0009   9       Two carriage returns
ROM              Monitor            $000C   12      Print space at cursor position
ROM              Monitor            $000F   15      Print TAB at cursor position
ROM              Monitor            $0012   18      Print display code held in A at cursor position
ROM              Monitor            $0015   21      Print ASCII message held at (DE) at cursor position
ROM              Monitor            $0018   24      Print ASCII message held at (DE) at cursor position (inc. control codes)
ROM              Monitor            $001B   27      Get keypress, store ASCII value in A
ROM              Monitor            $001E   30      Check for SHIFT + BREAK (Z flag set if so)
ROM              Monitor            $0021   33      Write header to cassette
ROM              Monitor            $0024   36      Write data to cassette
ROM              Monitor            $0027   39      Read header from cassette
ROM              Monitor            $002A   42      Read data from cassette
ROM              Monitor            $002D   45      Verify data on cassette
ROM              Monitor            $0030   48      Play melody as per BASIC 'MUSIC' command, music string held at (DE)
ROM              Monitor            $0033   51      Set realtime clock. A = 1 or 0 (AM/PM), DE = time in seconds
ROM              Monitor            $003B   59      Read the realtime clock, results into A & DE
ROM              Monitor            $003E   62      Cause brief tone to sound
ROM              Monitor            $0041   65      Set MUSIC tempo (value 1-7)
ROM              Monitor            $0044   68      Produce tone 2Mhz divide by two-bytes held at $11A1 & $11A2
ROM              Monitor            $0047   71      Silences above tone
ROM              Monitor            $03BA   954     Display HL on screen as 4-digit hex number
ROM              Monitor            $03C3   963     Display A on screen as 2-digit hex number
ROM              Monitor            $03DA   986     Convert d0-d3 of A into ASCII, stored back in A
ROM              Monitor            $03F9   1017    Convert ASCII in A to d0-d3 of A
ROM              Monitor            $0410   1040    Converts string of 4 ASCII characters starting at (DE) to hex, store in HL
ROM              Monitor            $041F   1055    Converts string of 2 ASCII characters starting at (DE) to hex, store in A
ROM              Monitor            $09B3   2483    Wait character input from keyboard (flash cursor), store display code in A
ROM              Monitor            $0BB9   3001    Convert ASCII value stored in A to display code, store back in A
ROM              Monitor            $0BCE   3022    Convert display code stored in A to ASCII value, store back in A
ROM              Monitor            $0DA6   3494    Not implemented (meant to be wait for VBlank. Code contains only C9-RET)
ROM              Monitor            $0DDC   3548    Control the display per code stored in A (clear screen, inverse etc)
ROM              Monitor            $0FB1   4017    Cursor position control
RAM              Monitor Work Area  $1000   4096    Monitor work area up to $11F4
RAM              Monitor Work Area  $1038   4152    Vector for interrupt mode 1 (when Monitor located at $0000)
RAM              Monitor Work Area  $10F0   4336    File type of the last file used with cassette storage
RAM              Monitor Work Area  $10F1   4337    17 bytes containing last used filename. Last byte is always $0D
RAM              Monitor Work Area  $1102   4354    2 bytes containing size of file (LSB then MSB)
RAM              Monitor Work Area  $1104   4356    2 bytes containing data address of file (LSB then MSB)
RAM              Monitor Work Area  $1106   4358    2 bytes containing execution address of file (LSB then MSB)
RAM              Monitor Work Area  $1108   4360    91 bytes for supplemental file information (comments etc)
RAM              Monitor Work Area  $1171   4465    Y position of cursor
RAM              Monitor Work Area  $1172   4466    X position of cursor
RAM              Monitor Work Area  $118E   4494    Current character underneath the cursor
RAM              Monitor Work Area  $11A3   4515    80 character buffer for line input routine ($0003)
Video RAM        -                  $D000   53248   Top-left corner of 1st page of screen memory
Video RAM        -                  $D027   53287   Top-right corner of 1st page of screen memory
Video RAM        -                  $D3C0   54208   Bottom-left corner of 1st page of screen memory
Video RAM        -                  $D3E7   54247   Bottom-right corner of 1st page of screen memory
Video RAM        -                  $D3E8   54248   Top-left corner of 2nd page of screen memory
Video RAM        -                  $D40F   54287   Top-right corner of 2nd page of screen memory
Video RAM        -                  $D7A8   55208   Bottom-left corner of 2nd page of screen memory
Video RAM        -                  $D7CF   55247   Bottom-right corner of 2nd page of screen memory
Mem Mapped I/O   8255               $E000   57344   Cursor timer reset / Keyboard Scan
Mem Mapped I/O   8255               $E001   57345   Keyboard Data
Mem Mapped I/O   8255               $E002   57346   Various (vertical blank, cursor status, cassette, Vgate, interrupt mask)
Mem Mapped I/O   8255               $E003   57347   Control word for 8255
Mem Mapped I/O   8253               $E004   57348   Counter #0 (clock frequency for music / sound production)
Mem Mapped I/O   8253               $E005   57349   Counter #1 (rate generator : divide 31.5Khz -> 1Hz : output to counter #2)
Mem Mapped I/O   8253               $E006   57350   Counter #2 (initiates interrupt when reached zero)
Mem Mapped I/O   8253               $E007   57351   Control word for 8253
Mem Mapped I/O   -                  $E008   57352   Status of tempo timer / Sound on/off / H-blank
Mem Mapped I/O   -                  $E00C   57356   Swap Monitor from $0000 to $C000
Mem Mapped I/O   -                  $E010   57360   Swap Monitor from $C000 to $0000
Mem Mapped I/O   -                  $E014   57364   Normal mode CRT display
Mem Mapped I/O   -                  $E015   57365   Inverse mode CRT display
Mem Mapped I/O   -                  $E200   57856   Roll display fully up. $E200 to $E2FF move VRAM by 8 character spaces
Mem Mapped I/O   -                  $E27D   57981   Roll display to top of 2nd page of screen memory
USER EPROM       2716               $E800   59392   2 kilobytes EPROM area for user programs, auto-run if first byte is $00
PERIPHERALS      -                  $F000   61440   Boot area for floppy disc unit
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s