Date : Mon, 15 Aug 1994 13:57:28 EST
From : Stephen Quan <quan@...>
Subject: Re: Late-night problemo!
> Don't even look at the time on this message... I've got kind of stuck
> into trying to get BASIC working.
>
> However...
>
> I havew a bit of a problem which I'd appreciate if someone could solve. I
> have put the BASIC ROM in at &8000 as recommended and not yet supported
> ROM paging via &FE30. However, during execution the O/S puts &F into
> &FE30 (is that paging in BASIC? The ROMs are in different places on my
> Beeb) and then (via the instruction at &F17B) does a JSR &8003. This
> causes my emulator to report a non-existent instruction - opcode &1F.
> I've had a look at the BASIC ROM and &1F is indeed the instruction at
> &8003. Just to make sure it wasn't my instruction list (which has been
> known to be a bit dodgy in the past!) I checked up with ADT on the Beeb.
> It reports &1F as being a non-instruction too.
I have BASIC loaded in at $B. There is a *FX call you can do on your
beeb to determine where BASIC is actually supposed to be. I find
HACKROM by James Bonfield and Stephen Youell to contain a useful
collection of * commands, I particularly like using *RLIST to verify
what ROMs I currently have loaded. I am not sure about &8003, but
non-instructions are executed as NOP instructions. If you leave BASIC
at &8000 and don't implement &FE30, I think the BBC would think BASIC
is loaded into every SRAM slot. That shouldn't be too much of a problem.
> Where have I gone wrong? There is no way (as far as I know) that location
> &8003 could hold anything other than &1F bearing in mind that BASIC is a
> ROM. Help! I'm going to bed before this drives me up the wall!
You ought to have a go at making sure everything else is ok, before
tackling this! ie. the points I raised about 80x86 vs 6502. Actually,
my emulator (my asm version) is programmed to bomb out when it receives
a non-instruction, and so far it hasn't. Then again, so far it hasn't
been able to execute more than a 1000 instructions without crashing or
deviating from my C version. *sigh* Luckily, I have implemented a
run-time hex-dump on both versions and have a program that does string
comparisons for me, so now, I can easily detect exactly where the
emulator has gone wrong. (I found those 80x86 vs 6502 differences over
four hours when I had hex-dump fully implemented). Took me a whole day
to debug the hex-dump routines thou.
If you want I can give you a short dump, perhaps the first 100
instructions with PC, A,X,Y,S,P values, and a copy of my 80x86 hex
dump routines (quite straight forward actually, can't really see why
I spent so long debugging it!).
--
Stephen Quan (quan@... ), SysAdmin, Analyst/Programmer.
Centre for Spatial Information Studies, University of Tasmania, Hobart.
GPO BOX 252C, Australia, 7001. Local Tel: (002) 202898 Fax: (002) 240282
International Callers use +6102 instead of (002).