Safest Zero Page Locations across Multiple Systems
Re: Safest Zero Page Locations across Multiple Systems
As the operating system is in high memory &FFFF downwards, (by neccessity, the hardware vectors are there), it makes sense for the operating system zero page to be in high memory, &00FF downwards.
--
JGH - http://mdfs.net
JGH - http://mdfs.net
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Safest Zero Page Locations across Multiple Systems
jgharston wrote:
As the operating system is in high memory &FFFF downwards, (by neccessity, the hardware vectors are there), it makes sense for the operating system zero page to be in high memory, &00FF downwards.
Something to consider if you "reverse" zero page that way is adding new locations may become more of a chore. If zero page usage starts at some low address X, ending at higher location Y and new locations are added in a future revision, they can be added as Y+1, Y+2, etc. The converse would effectively be Y-1, Y-2, etc., which if multiple zero page locations are used as pointers, can lead to complication in making assignments.
Incidentally, and to be a little pedantic, the MOS Technology/WDC assembly language standard for the 65xx family is to notate hexadecimal values as $xxxx, not &xxxx. More than a few assemblers interpret & as the logical AND operator, which would likely make &FFFF ambiguous or lead to an assembly-time error.
x86? We ain't got no x86. We don't NEED no stinking x86!
- BitWise
- In Memoriam
- Posts: 996
- Joined: 02 Mar 2004
- Location: Berkshire, UK
- Contact:
Re: Safest Zero Page Locations across Multiple Systems
BigDumbDinosaur wrote:
Incidentally, and to be a little pedantic, the MOS Technology/WDC assembly language standard for the 65xx family is to notate hexadecimal values as $xxxx, not &xxxx.
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs