Discuss all aspects of programming here. From 8-bit through to modern architectures.
9 posts • Page 1 of 1
Does anyone know what zp locations $60-$6F (any or all of) are used for and by what in the Beeb, Master and Elk? I don't mean 3rd-party stuff but I guess considering just the mainstream Acorn rom suites. Language workspace as an answer isn't really helpful because it looks like BASIC for example doesn't use it..... (I think?)
It's part of the memory reserved for the currently language. If you're not the current language you must not touch it.MartinB wrote:Does anyone know what zp locations $60-$6F (any or all of) are used for and by what in the Beeb, Master and Elk? I don't mean 3rd-party stuff but I guess considering just the mainstream Acorn rom suites. Language workspace as an answer isn't really helpful because it looks like BASIC for example doesn't use it..... (I think?)
Code: Select all
$ bbcbasic PDP11 BBC BASIC IV Version 0.25 (C) Copyright J.G.Harston 1989,2005-2015 >_
According to the "BASIC ROM User Guide" (Adder Press), BASIC 2 doesn't use those locations (page 61 says "&4F-&8F (not used)"). That matches what we see at https://acorn.huininga.nl/pub/docs/sour ... 202/Memory as well. But that doesn't mean that other common languages (eg VIEW, VIEWSHEET, EXMON, WORDWISE) don't use them.MartinB wrote:But is it actually used by, for example, BASIC 2 ?
The question, really, is how many of the standards are you willing to break? We all break them, 'cos zero page is in short supply!
Anything below &8F is allocated to the language. The Acorn spec for BASIC says that &70-&8F won't be used (hmm, they wrote that for the B, and I assume they didn't break it on the Master), but other languages may use it. So if you're not concerned about being safe with anything except BASIC 2 then you can probably use &50->&8F with impunity. If you care about other languages than you may want to save those values (eg on the stack) and then restore them afterwards.
Yeah, thanks Stephen, I'm ok with all that - I just wondered if anyone specifically knew of any users. I'm asking in relation to my I2C rom which is something I use a lot and for which I'll soon be pushing out an update. I designed it to be used in conjunction with BASIC and it can be used stand-alone but there are a majority of other roms and packages (languages or whatever) that you'd never want to use it with anyway. So, unless I can identify actual conflict, there's no way I'm going to avoid using memory that is pointlessly reserved for fictitious products by 30-year old expired guidelines when I'm producing real stuff that real people can use today....
With the caveat that I don't really know what the heck I'm talking about, this disassembly of BASIC2 does include the line "AND (&63,X)":
Thanks, I don't know what format those listings are in but towards the top of the page, it states as I've seen elsewhere that BASIC doesn't use beyond $5F in page zero. That instruction you've highlighted might perhaps be disassembled data but in any case, if I use this area, it would only be $65-$6F.
Yeah, that AND (&63,X) is just data (looks like floating point constants used by the floating point maths routines). Should really be rendered as a bunch of EQUBs rather than assembly instructions.