David Wilson wrote: >Aaron writes: >>So, I'm looking for a complete, and more importantly, *accurate* listing >>of all free page zero locations. I'm using ProDOS (obviously) and I need >>for these locations not to be tweaked by the Monitor when it gets a RESET; >>it would be useful for future programs to have a list of locations used by >>AppleSoft and the various firmware routines as well, but these are not >>needed for the current program. > >The ProDOS 8 Reference manual has a map of page zero which lists ProDOS, >Applesoft and Monitor usage of page zero (If I remember this correctly). >There are not many holes left when you take all these away. I tried to find my manual to reproduce these "maps" of used locations, but it's currently hiding. ;-) So here's a compilation I found (somewhere) on the web, with the free space locations highlighted. Enjoy. Page Zero Usage =============== $00-$05 - ??? $06-$09 - ***** ***** Free Space $0A-$0C - JMP to USR() User Function Routine $0D-$17 - ??? $18 - First Data Track $19 - First Data Sector $1A-$1B - Shape Pointer for DRAW $1C - Last COLOR Used $1D-$1E - ***** Free Space $1F - ??? $20 - Left Margin (0 - 39/79, 0 is default) $21 - Width (1 - 40/80, 40 is default, 0 crashes Applesoft) $22 - Top Margin (0 - 23, 0 is default, 20 in graphics mode) $23 - Bottom Margin (0 - 23, 23 is default) $24 - Horizontal Cursor Position (0 - 39/79) $25 - Vertical Cursor Position (0 - 23) $26-$27 - Address of Byte Containing X,Y $28-$29 - Base Address of Text Cursor's Position $2A - ??? $2B - Boot Slot * 16 $2C - Lo-Res HLIN/VLIN Endpoint $2D-$2F - ??? $30 - COLOR Value * 17 $31 - ??? $32 - Text Mask ($FF = Normal, $7F = Inverse, $3F = Flashing) $33 - Prompt Character $34-$35 - ??? $36-$37 - Address of Output Routine $38-$39 - Address of Input Routine $3A-$4F - ??? $50-$51 - Result of the Conversion of the FAC to a 16-Bit Integer $52-$66 - ??? $67-$68 - Address of Beginning of BASIC Program ($0801 is default) $69-$6A - Address of Beginning of BASIC Variables $6B-$6C - Address of Beginning of BASIC Arrays $6D-$6E - Address of End of BASIC Variables $6F-$70 - Address of End of String Data $71-$72 - Address to Move String To $73-$74 - Address of Beginning of String Data $75-$76 - Current Line Number Being Executed $77-$78 - Line Number Where END or STOP or BREAK Occurred $79-$7A - Address of Line Number Being Executed $7B-$7C - Current Address of DATA $7D-$7E - Next Address of DATA $7F-$80 - Address of Input or Data $81-$82 - Last Used Variable's Name $83-$84 - Last Used Variable's Address $85-$9A - ??? $9B-$9C - Pointer for $D61A and $F7D9 $9D-$A3 - Floating Point Accumulator (FAC) $A4 - ??? $A5-$AB - Floating Point Argument Register (ARG) $AC-$AE - ??? $AF-$B0 - Address of End of BASIC Program $B1-$B6 - Subroutine to Increase the String Data Pointer $B7-$BE - Subroutine to Return the Character Pointed to by the String Data Pointer $BF-$CD - ??? $CE-$CF - ***** Free Space $D0-$D3 - ??? $D4 - Error Code Flag $D5-$D6 - ??? $D7 - ***** Free Space $D8 - Error Flag (Bit 7 Set if an Error Handler is Used) $D9 - ??? $DA-$DB - Line Number Where Error Occurred $DC-$DD - ??? $DE - Error Code $DF - ??? $E0-$E1 - Horizontal Coordinate of HPLOT $E2 - Vertical Coordinate of HPLOT $E3 - ***** Free Space $E4 - HCOLOR Value (0=0, 1=42, 2=85, 3=127, 4=128, 5=170, 6=213, 7=255) $E5 - ??? $E6 - High Byte of Address of First Byte of Where HGR is Plotted $E7 - SCALE Value (0 = 256) $E8-$E9 - Address of Shape Table $EA - DRAW/XDRAW Collision Count $EB-$EF - ***** Free Space $F0 - ??? $F1 - SPEED Value (Subtracted From 256) $F2 - ??? $F3 - Text OR Mask for Flashing Text $F4-$F5 - Address of Error Handler (Line Number after ONERR GOTO) $F6-$F8 - ??? $F9 - ROT Value $FA-$FE - ***** Free Space $FF - Used by Applesoft's STR$ Function -michael Check out amazing quality sound for 8-bit Apples on my Home page: http://members.aol.com/MJMahon/ Michael J. Mahon wrote: > So here's a compilation I found (somewhere) on the web, with > the free space locations highlighted. > $D5-$D6 - ??? Something burned into my brain: $D6 is the Applesoft run flag. If set to nonzero, every command runs the current program (POKE 214,255 anyone?). I believe all of the Applesoft values are reset on a cold start, so a ProDOS system program should be able to use any of those freely. -- Send mail to fadden@fadden.com (Andy McFadden) - http://www.fadden.com/ CD-Recordable FAQ - http://www.cdrfaq.org/ CiderPress Apple II archive utility for Windows - http://www.faddensoft.com/ Fight Internet Spam - http://spam.abuse.net/spam/ & http://spamcop.net/ David Wilson wrote: >The ProDOS 8 Reference manual has a map of page zero which lists ProDOS, >Applesoft and Monitor usage of page zero (If I remember this correctly). >There are not many holes left when you take all these away. I finally remembered where I'd seen these maps: the Apple IIe Technical Reference Manual. Although it offers no interpretation of the usage of the locations, it provides an excellent reference to what page zero locations are used by each major subsystem. This might make a nice addition to the Programming FAQ. (Display in monospaced font.) Zero-Page Usage =============== Monitor Zero-Page Usage -------------------------------------------------------------- High nibble | Low nibble of address of address | 0 1 2 3 4 5 6 7 8 9 A B C D E F -------------------------------------------------------------- $00 $10 *+ $20 * * * * * * * * * * * * * * * * $30 * * * * * * * * * * * * * * * * $40 * * * * * * * * * * * * $50 * * * * * * $60 $70 $80 $90 $A0 $B0 $C0 $D0 $E0 $F0 (+ Byte used in original Apple //e ROMs, now free) Applesoft Zero-Page Usage -------------------------------------------------------------- High nibble | Low nibble of address of address | 0 1 2 3 4 5 6 7 8 9 A B C D E F -------------------------------------------------------------- $00 * * * * * * * * * * * * $10 * * * * * * * * * * * * * * $20 * * * * * $30 * * * * * * * $40 $50 * * * * * * * * * * * * * * * * $60 * * * * * * * * * * * * * * * * $70 * * * * * * * * * * * * * * * * $80 * * * * * * * * * * * * * * * * $90 * * * * * * * * * * * * * * * * $A0 * * * * * * * * * * * * * * * * $B0 * * * * * * * * * * * * * * * * $C0 * * * * * * * * * * * * * * $D0 * * * * * * * * * * * * * * * $E0 * * * * * * * * * * * $F0 * * * * * * * * * * * Integer BASIC Zero-Page Usage -------------------------------------------------------------- High nibble | Low nibble of address of address | 0 1 2 3 4 5 6 7 8 9 A B C D E F -------------------------------------------------------------- $00 * $10 $20 $30 $40 * * * * $50 * * * * * * * * * * * $60 * * * * * * * * * * * * * * * * $70 * * * * * * * * * * * * * * * * $80 * * * * * * * * * * * * * * * * $90 * * * * * * * * * * * * * * * * $A0 * * * * * * * * * * * * * * * * $B0 * * * * * * * * * * * * * * * * $C0 * * * * * * * * * * * * * * * * $D0 * * * * * * * * * * * * * * * * $E0 $F0 * * DOS 3.3 Zero-Page Usage -------------------------------------------------------------- High nibble | Low nibble of address of address | 0 1 2 3 4 5 6 7 8 9 A B C D E F -------------------------------------------------------------- $00 $10 $20 * * * * * * * * $30 * * * * * * * $40 * * * * * * * * * * * * * $50 $60 * * * * * $70 * $80 $90 $A0 * $B0 * $C0 * * * * $D0 * $E0 $F0 ProDOS MLI and disk driver Zero-Page Usage -------------------------------------------------------------- High nibble | Low nibble of address of address | 0 1 2 3 4 5 6 7 8 9 A B C D E F -------------------------------------------------------------- $00 * * $10 $20 $30 * * * * * * $40 * * * * * * * * * * * * * * * $50 $60 $70 $80 $90 $A0 $B0 $C0 $D0 $E0 $F0 ---------------- -michael Check out amazing quality sound for 8-bit Apples on my Home page: http://members.aol.com/MJMahon/