Wednesday, November 15, 2017

Running BASIC

I was able to get BASIC running with out much difficulty once I overcame a bit of confusion with the compiler I was using. First, I started with Z80 Basic by Grant Searle. The only file that needed to be altered was intmini,asm. I made some minor changes to use the TL16C550 UART at 115,200 baud. To get things going quickly, I removed most of the error checking which had more to do with buffer over-runs. I figured, at 115K and my slow typing, I didn't really need them.

As I mentioned, my compiler threw me for a loop. There was a configuration setting I missed that would offset the compiler output by 0x100. The code compiled fine and some of the basic functions worked but the UART interrupt didn't work. Due to the setting in the compiler, all the interrupt vectors were NOP'd and offset by 0x100. The UART would generate the interrupt but, since the vector was a NOP, it would run until 0x100 where the reset vector ended up. It took me longer to figure this one out than it should have..........but I did and BASIC is now running.