Quantcast
Channel: stardot.org.uk
Viewing all articles
Browse latest Browse all 2392

development tools • Re: Building BASIC4 source

$
0
0
BBCMicroCompendium has a complete disassembly of BASIC II.)
This Compendium looks really helpful - especially from page 189 and the likes. I found the keyboard input buffer in the BASIC ROM User Guide but yeah.. it is a bit of a mission when the info seems to be spread across multiple places.

I recently went through the exercise of making a Vic20 emulator to follow through what the Kernal and BASIC ROM were doing so I'll make use of the same source and see how far the execution (with diassembly) gets before crashing or simply looping. I'd like to see some read accesses between $700-7ff in there.

The Vic was relatively straight forward. It was easy enough to fill the keyboard buffer and execute lines of BASIC. Supporting actual keypresses with IRQ/NMI interrupts was a bit more fiddly but I'm not intending to emulate the BBC here so I'll try and stub in as little as possible.

I did of course load the Vic Kernel into memory too so it had pretty much everything it needed in the 64K address space. I can't see BBC BASIC kicking into life without vectors and the likes being set up first though. I'm sure the Kernel (MOS?) would normally intialise BASIC in some way but I guess I'll find out :-)

Update: I have had a bit of a play getting the ROM into my "emulator". First thing I notice is that the BASIC seems to make a lot of direct calls to OSBYTE :-) Haha.. This is actually quite different from the CBM BASIC. Maybe the CBM (Microsoft?) BASIC has more indirection and configurability .. and perhaps this is why its slower than BBC BASIC in general?

So.. I wonder if I just need to implement OSBYTE calls or if there are other MOS calls that the BASIC calls as well? I guess we'll find out. I'm quite excited in a way..

Statistics: Posted by SparkyNZ — Mon Feb 12, 2024 3:36 am



Viewing all articles
Browse latest Browse all 2392

Trending Articles