<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Sun, 28 Nov 2004 12:31:57 +0000
From   : jgh@... (Jonathan Graham Harston)
Subject: Re: ...at line ___

Andrew W <a.weston2@...> wrote:
> On trying to CALL a section of machine code at &79B5 (Himem set below
> this and AFAICT the next block of machine code does not overlap), I get
> the error "@line <line no. of CALL>". What generally does this
> indicate - that I am trying to access inappropriate memory locations
> (for example like 'internal error at &...' on RISC OS?)?
 
The code has fallen over and eventually stumbled into some &00 bytes. &00
is BRK which the BBC MOS uses to indicate an error. The error string
follows, followed by a &00 terminator. Consequently, code that falls into
a block of zeros will generate an error, errnum &00 and errstr="".
 
This would do it:
 
P%=&3000
[
LDA #22:JSR OSWRCH
LDA #0:JSR OSWRCH
LDA #7:JSR OSWRCH
RTS
]
 
The code is at &3000, but it switches to MODE 0, which clears memory at
&3000, so instead of LDA #7:JSR OSWRCH:RTS being in memory, the code
stumbles into lots of zeros.
 
-- 
J.G.Harston - jgh@...                - mdfs.net/User/JGH
Badly formed email is deleted unseen as spam
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>