<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Sun, 28 Dec 2008 14:12:21 -0000
From   : mfirth@... (Michael Firth)
Subject: Using stack page for temp vars

----- Original Message ----- 
From: "Rob" <robert@...>
To: "BBC micro mailing list" <bbc-micro@...>
Sent: Sunday, December 28, 2008 12:29 PM
Subject: Re: [BBC-Micro] Using stack page for temp vars


> 2008/12/28 Alex Taylor <zeem.uk@...>:
>> 2008/12/28 Jonathan Graham Harston <jgh@...>:
>>
>>> I am **FED** **UP** with calling *commands from View, Diagram, 
>>> ViewSheet,
>>> Exmon, Art, any non-BASIC language, and things being corrupted because 
>>> it's
>>> trampled over space that BASIC doesn't use, thinking that nothing uses 
>>> it.
>>
>> This is really interesting, because I think I may have been guilty of
>> this (even though I was in my teens at the time). I'm not sure if this
>> counts though, it was a tiny piece of machine code called from a BASIC
>> program - is that the same, or does that not count because it's called
>> from within BASIC?
>
> No, that doesn't count becuase that's what the reserved bytes were for
> - for use by code exclusively used from within BASIC programs,  The
> problem comes when people write more "generic" routines (things like
> sideways ROM/RAM tools for instance) to use that workspace, because
> they might be called from within other language ROMs, where that
> workspace is not available, and so they disrupt the operation of the
> language concerned.
>
Does that mean that I'm incorrect in my assumption that almost everyone 
would do any SRAM handling from BASIC?

Do people really start up View, ViewSheet or Wordwise, and then think "I 
really need to have X loaded into my SRAM now?"

My modus operandi is (and I think always was with the BBC) to load 
everything I'm going to need, then do my task, and then stop. I guess very 
occasionally, I would think "Oh bugger, I wish I'd loaded that", but it 
would be very infrequent. Also, as you usually need to reset after loading 
an SRAM image, having it mess up the current language isn't going to be a 
problem anyway.

I guess back in the 80s, there were BBCs dedicated to one task which would 
turn on into View, or Wordwise or something, so it might matter for such 
machines, but I would have thought that even then 90%+ would have started up 
in BASIC, and then been switched to other languages. I would expect that now 
it would be at least 99% that would be multi-use machines.

Michael
Michael 




<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>