Date : Sat, 27 Nov 2004 00:58:29 +0000 (GMT)
From : Andrew W <a.weston2@...>
Subject: Re: ...at line ___
In <URL:news:local.misc> on Fri 26 Nov, Brian Widdas wrote:
> It means you've hit a bunch of zero bytes.
>
That would explain why the program stops and when called from the BASIC prompt
just produces 2 blank lines I suppose.
> An error on the BBC Micro looks like this:
>
> BRK
> EQUB <1 byte error number>
> EQUS "Danger, Will Robinson!"+CHR$(0)
>
> The BRK causes a software interrupt. The OS (or it is the current language
> ROM?) code at the SWI vector reads the next byte as the error number, and
> the subsequent bytes until a control character as the error string.
>
> Since BRK is 0 when compiled to machine code, it's possible to do this;
>
> BRK:BRK:EQUS "This is an error with error number 0":BRK
>
> Naturally, if you didn't want an error string, you could do this:
>
> BRK:BRK:BRK
>
> Which is what a bunch of memory full of zeroes looks like.
>
> Are you calling the right location?
I'm going to have to go check the addresses again as I've got three separate
blocks that I load in with *Load and the errors that are being thrown up
are very strange. For example if I add something to the listing (BASIC),
the code works
but if I remove it then it produces this error. If I remove something of
a different size from the listing then the program can freeze.
On doing DIM A%-1 and P.HIMEM-A% I get a value of over 4K so at least I think
I aven't over-run the free memory available (don't think the BASIC stack
is being used intensively either). All I can think of is that the 3 machine
code routin
es are overlapping.
regards,
A.Weston
--
Staffordshire, UK of GB&NI.