EhBASIC IRQ support in min_mon.asm

A forum for users of EhBASIC (Enhanced BASIC), a portable BASIC interpreter for 6502 microcomputers written by Lee Davison.
User avatar
Rob Finch
Posts: 465
Joined: 29 Dec 2002
Location: Canada
Contact:

Re: EhBASIC IRQ support in min_mon.asm

Post by Rob Finch »

Quote:
r1 is synonymous for the 8-bit accumulator I suppose
Yes, r1 refers to the accumulator, the lower eight bits are the eight bit accumulator. The load byte instruction doesn't have and accumulator form. So it has to be specified as r1.

I'm pretty sure PHA/PLA are working properly. All the memory loads go through a single state. Most of the stores (except jsr, ) go through a single store state.

I tried increasing the clock frequency to see if I could make the problem worse, but it didn't have an affect.

The V_OUTP routine calls DisplayChar which is outputting a character to a text display.
Hmm, I see now that I don't mask off the high order bits when DisplayChar is called. I suppose there could be garbage in the high order bits when switching from eight bit mode. I'll have to try masking off the high order bits.
User avatar
Rob Finch
Posts: 465
Joined: 29 Dec 2002
Location: Canada
Contact:

Re: EhBASIC IRQ support in min_mon.asm

Post by Rob Finch »

Masking off high order bits fixed the problem. Strange that there was only the occasional problem when interrupts were enabled.
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: EhBASIC IRQ support in min_mon.asm

Post by barrym95838 »

Rob Finch wrote:
Masking off high order bits fixed the problem.
I think that I'm starting to see a pattern in your problems. I hope that no other bugs turn up, but if they do, the first thing on the list should probably be to check if bits 8 to 31 are fouling the works somehow, somewhere.

Good luck.

Mike
Post Reply