lotus

previous page: 014- How can I view and enter code using the "monitor"?
  
page up: Apple II Programming FAQ
  
next page: 016- Can I do multi-tasking on a IIgs? or What is GNO/ME?

015- What parts of Apple II memory should a user be careful about modifying when using the monitor?




Description

This article is from the Apple II Programming FAQ, by Jeff Hurlburt with numerous contributions by others.

015- What parts of Apple II memory should a user be careful about modifying when using the monitor?

    It is important to keep in mind that you can do all sorts of nasty
things to the computer if you play around in the monitor and don't
know where things are located in memory.

The safest bet if you want to have a play would be to start the
computer with no disk in the drive, then get into the monitor.

Don't play around with the following memory areas at all (unless you
know exactly what you are doing):

0020-004F Zero page memory area used by the monitor
0100-01FF Stack
0200-02FF Input buffer
03D0-03FF System vectors
C000-C0FF I/O space. Don't even read memory in this area
          unless you know what you are doing.
C100-C7FF I/O firmware (usually ROM on cards in slots, or
          emulated slots). Some I/O cards may have I/O
          ports in this area (but not for the IIc).
C800-CFFF Bank-switched area used by I/O cards. It is safe
          to read this area in the IIc, but it has to be
          handled carefully in other machines.
 

The following areas must be handled carefully to avoid problems:

0050-00FF Zero page memory area used by Applesoft BASIC
0400-07FF Text screen and "screen holes", which contain
          system data
D000-FFFF ROM and bank-switched RAM ("language card").
          Don't write anything into this area, especially
          if you are running under ProDOS.
 

Other memory areas that you may need to be aware of:

0800-???? Applesoft BASIC programs normally go here,
          followed by variables
2000-3FFF Hires graphics buffer for page 1
4000-5FFF Hires graphics buffer for page 2
9600-BFFF Normally used by DOS 3.3 or ProDOS
????-95FF Normally used for strings in Applesoft BASIC

The hires graphics buffers are only an issue if you need to use
them. Under DOS 3.3 or ProDOS, the upper memory limit (9600) may
change depending on the use of the MAXFILES command under DOS or the
number of open files under ProDOS.
 

This leaves you with the following areas that you can usually play
with to your heart's content. There are some exceptions, but I've
covered enough for one article.

0000-001F This isn't entirely free, but is usually OK.
0300-03CF Often used for small machine code programs.
1000(ish)-7FFF(ish)

The last area varies wildly depending on the size of any BASIC program
and its variables.

--David Empson
    

 

Continue to:













TOP
previous page: 014- How can I view and enter code using the "monitor"?
  
page up: Apple II Programming FAQ
  
next page: 016- Can I do multi-tasking on a IIgs? or What is GNO/ME?