Can it safely be assumed that a RAM address can never be "negative" in a SMSQ/E system? Ie,
that so much of the system relies on the assumption that RAM will never exceed 2GB, that any negative
return from some function can be taken to be an error code rather than a valid address..?
Asking for a friend..
A programming question
- janbredenbeek
- Super Gold Card
- Posts: 633
- Joined: Wed Jan 21, 2015 4:54 pm
- Location: Hilversum, The Netherlands
Re: A programming question
On the Q68, the display memory starts at address $FE800000 and the internal I/O at $FF000000. So addresses can be 'negative' on this hardware.pjw wrote:Can it safely be assumed that a RAM address can never be "negative" in a SMSQ/E system? Ie,
that so much of the system relies on the assumption that RAM will never exceed 2GB, that any negative
return from some function can be taken to be an error code rather than a valid address..?
Asking for a friend..
Jan
Re: A programming question
Agree that generally, an address can be negative (not only on the Q68, the Q40/Q60 have nearly the same layout).
Some internal routines in SMSQ/E and QDOS, however, like the queue and list support, do assume and rely on the fact that "normal", working memory addresses are always positive.
Tobias
Some internal routines in SMSQ/E and QDOS, however, like the queue and list support, do assume and rely on the fact that "normal", working memory addresses are always positive.
Tobias
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
- janbredenbeek
- Super Gold Card
- Posts: 633
- Joined: Wed Jan 21, 2015 4:54 pm
- Location: Hilversum, The Netherlands
Re: A programming question
This goes for the job and channel table too ($FFxxxxxx indicates an unused entry, else it's a pointer to the job header or channel definition block).tofro wrote:Agree that generally, an address can be negative (not only on the Q68, the Q40/Q60 have nearly the same layout).
Some internal routines in SMSQ/E and QDOS, however, like the queue and list support, do assume and rely on the fact that "normal", working memory addresses are always positive.
Fortunately, it's very unlikely that these would extend into the Q68's screen memory .
Jan
Re: A programming question
I suspected the possibility regarding hardware addresses. So let me be more specific: A user RAM request will never, ever return a "negative" address, right?
I guess that by the time we see systems sporting 2 gig or more - in about 2029 Jan 19 03:14:08 (or more likely around 2097 Feb 06 06:28:15) - so many other things will have had to change that the issue will be moot anyways..
I guess that by the time we see systems sporting 2 gig or more - in about 2029 Jan 19 03:14:08 (or more likely around 2097 Feb 06 06:28:15) - so many other things will have had to change that the issue will be moot anyways..
Per
dont be happy. worry
- ?
dont be happy. worry
- ?
Re: A programming question
It seems RAM is limited by compatibility with one of the superbasic compilers (Qliberator?) which used the top 3 bits of the address references to store data about the reference. These need to be 'don't care' for decoding (which also makes it 'fun' to write cache management code...), so only bits 28 down to 0 are used for addressing, resulting in 512M total RAM. This is of course a limitation on OS managed RAM, not things like frame buffer RAM for video, as this is not used to store programs. Hence, you should be safe and anything managed by the OS should never return a negative pointer to a RAM address.
Re: A programming question
Knowledgeable and comprehensive answer as usual Thanks!Nasta wrote:It seems RAM is limited by compatibility with one of the superbasic compilers (Qliberator?) which used the top 3 bits of the address references to store data about the reference. These need to be 'don't care' for decoding (which also makes it 'fun' to write cache management code...), so only bits 28 down to 0 are used for addressing, resulting in 512M total RAM. This is of course a limitation on OS managed RAM, not things like frame buffer RAM for video, as this is not used to store programs. Hence, you should be safe and anything managed by the OS should never return a negative pointer to a RAM address.
Per
dont be happy. worry
- ?
dont be happy. worry
- ?