Skip to main content
? Erik 'ES of TEX' Simon, 1989

ATARI ST MEMORY MAP by Richard Karsmakers

I bet you must have seen some memory map somewhere already.  But, 
like most people, you'll probably have thought: "That's no bloody 
memory map at all!".  Especially people who were formerly used to 
the Commodore 64's programmer's reference guide will surely  have 
been ultimately disappointed when they saw anything of the kind - 
uptil now.

Some  time  ago  I went digging in  the  ST's  operating  system, 
together with Frank.  After many,  many nights of documenting the 
ROM (we're still not ready by miles), we think we have now gained 
some  information  that we already want to share  with  you.  The 
memory  map that I offer in this article is still not complete  - 
it would take a whole issue of ST NEWS to write all that down  if 
we would have found out all of it.

A warning needs to be given before you all start using the  given 
information:  With the launch of the new Mega STs,  it might very 
well be possible that the undocumented system variables/addresses 
will change.  So programs that run smoothly on a regular ROM  TOS 
ST, might then not work at all!
All  numbers  in  the following table are  given  in  hexadecimal 
notation.  The characters behind the address indicate whether the 
address contains a byte (.B),  word (.W) or longword (.L)  value. 
If an asterisk (*) is added as well,  this means that the address 
mentioned is undocumented - so beware!

For more specific information about the addresses,  I fear I must 
direct  you to either "ST Intern" or the "Concise Atari ST  68000 
Programmer's Reference Guide".

Exception vectors

  $000.L      Reset initial SSP value
  $004.L      Reset initial PC address
  $008.L      Bus error
  $00C.L      Address error
  $010.L      Illegal instruction
  $014.L      Division by zero
  $018.L      Chk instruction
  $01C.L      Trapv instruction
  $020.L      Privilege violation
  $024.L      Trace mode
  $028.L      Line 1010 (Line A routine)
  $02C.L      Line 1111 (Used by AES)
  $030.L      Unassigned
  $034.L      Coprocessor protocol violation (for MC68020)
  $038.L      Format error (for MC68020)
  $03C.L      Uninitialised interrupt vector
  $040.L      Unassigned
  $044.L      Unassigned
  $048.L      Unassigned
  $04C.L      Unassigned
  $050.L      Unassigned
  $054.L      Unassigned
  $058.L      Unassigned
  $05C.L      Unassigned
  $060.L      Spurious interrupt (Hacked to level 3)
  $064.L      Interrupt level 1 (Used when user wants Hblanks)
  $068.L      Interrupt level 2 (Hblank sync)
  $06C.L      Interrupt level 3 (Normal processor interrupt
                                 level)
  $070.L      Interrupt level 4 (Vblank sync)
  $074.L      Interrupt level 5
  $078.L      Interrupt level 6 (MK68901 MFP Interrupts)
  $07C.L      Interrupt level 7 (NMI)
  $080.L      Trap #0
  $084.L      Trap #1 (GEMDOS interface calls)
  $088.L      Trap #2 (Extended DOS calls)
  $08C.L      Trap #3
  $090.L      Trap #4
  $094.L      Trap #5
  $098.L      Trap #6
  $09C.L      Trap #7
  $0A0.L      Trap #8
  $0A4.L      Trap #9
  $0A8.L      Trap #10
  $0AC.L      Trap #11
  $0B0.L      Trap #12
  $0B4.L      Trap #13 (BIOS interface calls)
  $0B8.L      Trap #14 (XBIOS interface calls)
  $0BC.L      Trap #15
  $0C0-$0FF   Unassigned

MFP hardware bound interrupt vectors

  $100.L      Parallel port interrupt_0 (Centronics Busy)
  $104.L      RS232 carrier detect (dcd) interrupt_1
  $108.L      RS232 clear to send (cts) interrupt_2
  $10C.L      Graphics blt done interrupt_3
  $110.L      RS232 baud rate generator (Timer D)
  $114.L      200 Hz system clock (Timer C)
  $118.L      Keyboard/MIDI (6850) interrupt_4
  $11C.L      Polled fdc/_hdc interrupt_5
  $120.L      Horizontal blank counter (Timer C)
  $124.L      RS232 transmit error interrupt
  $128.L      RS232 transmit buffer empty interrupt
  $12C.L      RS232 receive error interrupt
  $130.L      RS232 receive buffer full interrupt
  $134.L      User/application (Timer A)
  $138.L      RS232 ring indicator interrupt_6
  $13C.L      Polled monochrome detect interrupt_7
  $140-$1FF   Unassigned

Application interrupts

  $200-$37F   Reserved for Other Equipment Manufacturers (OEMs)

Processor state (Post mortem dump area)

  $380.L      Proc_lives
  $384.L      Proc_regs (saved D0)
  $388.L      Proc_regs (saved D1)
  $38C.L      Proc_regs (saved D2)
  $390.L      Proc_regs (saved D3)
  $394.L      Proc_regs (saved D4)
  $398.L      Proc_regs (saved D5)
  $39C.L      Proc_regs (saved D6)
  $3A0.L      Proc_regs (saved D7)
  $3A4.L      Proc_regs (saved A0)
  $3A8.L      Proc_regs (saved A1)
  $3AC.L      Proc_regs (saved A2)
  $3B0.L      Proc_regs (saved A3)
  $3B4.L      Proc_regs (saved A4)
  $3B8.L      Proc_regs (saved A5)
  $3BC.L      Proc_regs (saved A6)
  $3C0.L      Proc_regs (saved A7_ssp)
  $3C4.L      Proc_pc
  $3C8.L      Proc_usp
  $3CC.W      Proc_stk (total of 16 words)
  $3CE.W      Proc_stk
  $3D0.W      Proc_stk
  $3D2.W      Proc_stk
  $3D4.W      Proc_stk
  $3D6.W      Proc_stk
  $3D8.W      Proc_stk
  $3DA.W      Proc_stk
  $3DC.W      Proc_stk
  $3DE.W      Proc_stk
  $3E0.W      Proc_stk
  $3E2.W      Proc_stk
  $3E4.W      Proc_stk
  $3E6.W      Proc_stk
  $3E8.W      Proc_stk
  $3EA.W      Proc_stk
  $3EC-$3FF   Unassigned

System Variables

  $400.L      Etv_timer (Timer handoff)
  $404.L      Etv_critic (Critical error handoff vector)
  $408.L      Etv_term (Process terminate handoff vector)
  $40C.L      Etv_xtra (Space for additional GEM vectors)
  $410.L      Etv_xtra
  $414.L      Etv_xtra
  $418.L      Etv_xtra
  $41C.L      Etv_xtra
  $420.L      Memvalid (Cold start OK if #$752019F3)
  $424.B      Memcntlr (Memory controller low nibble)
  $425.B      Unassigned
  $426.L      Resvalid (#$31415926 to jump through 'resvector')
  $42A.L      Resvector (System reset bailout vector)
  $42E.L      Phystop (Physical RAM top)
  $432.L      _Membot (Available memory bottom)
  $436.L      _Memtop (Available memory top)
  $43A.L      Memval2 (#$237698AA)
  $43E.W      Flock (Floppy FIFO lock variable)
  $440.W      Seekrate (Floppy seekrate)
  $442.W      _Timr_ms (System timer calibration)
  $446.W      _Fverify (Floppy verify flag)
  $448.W      Palmode
  $44A.B      Desfshftmd (Default video res if monitor changed)
  $44B.B      Unassigned
  $44C.B      Sshiftmd (Shadow shiftmode hardware register)
  $44D.B      Unassigned
  $44E.L      _V_bas_ad (Screen memory base pointer)
  $452.W      Vblsem (Vertical blank mutual exclusionm semaphore)
  $454.W      Nvbls (No. of longwords 'vblqueue' points to)
  $456.L      _Vblqueue (Vblank handler pointer to pointers)
  $45A.L      Colorptr
  $45E.L      Screenpt (Screen base next vbl pointer)
  $462.L      _vbclock (Vertical blank interrupt count)
  $466.L      _Frclock (Count vblank interrupts not vblsem'd)
  $46A.L      Hdv_init (Hard disk intitialise vector)
  $46E.L      Swv_vec (Monitor changed vector)
  $472.L      Hdv_bpb (Hard disk vector to return BPB)
  $476.L      Hdv_rw (Hard disk vector to read/write)
  $47A.L      Hdv_boot (Hard disk boot routine vector)
  $47E.L      Hdv_mediach (Disk media change routine vector)
  $482.W      _Cmdload
  $484.B      Conterm (Console sys)
  $485.B      Unassigned
  $486.L      Trp14ret (Saved Trap #14 return address)
  $48A.L      Criticret (Saved return address for Etv_critic)
  $48E.L      Themd (GEMDOS memory descriptors) (M_link)
  $492.L      Themd (M_start)
  $496.L      Themd (M_length)
  $49A.L      Themd (M_own)
  $49E.L      _Md
  $4A2.L      Savptr (BIOS register save area pointer)
  $4A6.W      _Nflops (Number of floppies attached)
  $4A8.L      Con_state (State of Conout() parser)
  $4AC.W      Save_row (Save row# for x-y addressing)
  $4AE.L      Save_contxt (Pointer to saved processor context)
  $4B2.L      _Bufl (Data sector buffer)
  $4B6.L      _Bufl (FAT and DIR sectors buffer)
  $4BA.L      _Hz_200 (Raw 200 Hz timer tick)
  $4BE.L      The_env (Default environment string)
  $4C2.L      _Drvbits (32 bit vector of live block devices)
  $4C6.L      Dskbufp (Pointer to common disk buffer - 1 Kb)
  $4CA.L      _Autopath (Pointer to autoexec path)

  $4CE.L      _Vbl_list (A total of 8 longwords that are executed
                         at every vertical blank)
  $4D2.L      _Vbl_list
  $4D6.L      _Vbl_list
  $4DA.L      _Vbl_list
  $4DE.L      _Vbl_list
  $4E2.L      _Vbl_list
  $4E6.L      _Vbl_list
  $4EA.L      _Vbl_list
  $4EE.W      _Prt_cnt (Print counter, intially -1, ALT-HELP inc)
  $4F0.W      _Prtabt (Printer abort flag)
  $4F2.L      _Sysbase (Base of OS pointer)
  $4F6.L      _Shell_p (Global shell info pointer)
  $4FA.L      End_os (Pointer to end of OS memory usage)
  $4FE.L      Exec_os (Pointer to shell addr. to exec on startup)
  $502.L*     Hardcopy (Hardcopy routine vector)
  $506.L*     Listin (Parallel port status routine)
  $50A.L*     Lstout (Output character to parallel port routine)
  $50E.L*     Auxostat (RS232 output status routine)
  $512.L*     Auxout (RS232 output routine)
  $516-$83F   Unassigned

Other more or less useful addresses

  $840  *     Pathname buffer (e.g. PATH= A:\)

  $93A.L*     Return address for Auto files
  $93E.L*     Pathname address (\AUTO\*.PRG)
  $942.L*     Filename address (\*.PRG)
  $946.L*     DMA address

  $964  *     Filename in autofolder buffer (e.g. NAME.PRG)
  $972  *     Whole name buffer (e.g. \AUTO\NAME.PRG)

Memory address that are used by the OS hardcopy routine

  $992.L*     Buffer for '_V_bas_ad' when hardcopy
  $996.W*     Offset
  $998.W*     Screen width
  $99A.W*     Screen height
  $99C.W*     Left
  $99E.W*     Right
  $9A0.W*     Buffer for 'sshiftmd'
  $9A2.W*     Quality mode
  $9A4.L*     Color palette address
  $9A8.W*     Printer table
  $9AA.W*     Parallel/serial flag
  $9AC.W*     Mask pointer

Memory addresses that are used by the floppies

  $9B0.W*     Retrycnt (Retry count)
  $9B2.W*     Write Protect status
  $9B4.W*     Cdev ('wplatch'?)

  $9C6  *     Sector number
  $9CC.B*     CDMA (DMA buffer for bad sector list)
  $9CD.B*     DMA high
  $9CE.B*     DMA mid
  $9CF.B*     DMA low

  $A06  *     DSB Drive A

Buffers

  $A0E  *     RS232 Input buffer
  $B0E  *     RS232 Output buffer
  $C0E  *     Keyboard buffer
  $D0E  *     MIDI buffer
  $DCC  *     Keyboard/MIDI table
  $E28  *     Mouse buffer

Addresses that are used by XBIOS function 32, 'Dosound'

  $E44.L*     Music data pointer
  $E48.L*     Temporary storage register

Miscellaneous other addresses

 $167A-$1879* Sector buffer (Boot sector)

 $29B4.L*     Max access time *20 ms

 $5220  *     Directory buffer

Disclaimer
The text of the articles is identical to the originals like they appeared in old ST NEWS issues. Please take into consideration that the author(s) was (were) a lot younger and less responsible back then. So bad jokes, bad English, youthful arrogance, insults, bravura, over-crediting and tastelessness should be taken with at least a grain of salt. Any contact and/or payment information, as well as deadlines/release dates of any kind should be regarded as outdated. Due to the fact that these pages are not actually contained in an Atari executable here, references to scroll texts, featured demo screens and hidden articles may also be irrelevant.