<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Thu, 25 Aug 1994 09:18:26 WET DST
From   : Bonfield James <jkb@...>
Subject: BBC-L: system via IER bit CA2

Hello,

My keyboard emulation currently is not working. It WAS working for a while,
but somewhat skattily.

The problem now can be seen as the following:

I _NEVER_ see the instruction to enable CA2 interrupts. This should be seen as
something like writing &81 to &FE4E. But I just never seem to execute such an
instruction! Bizarre.

Also, some clarification on the A.U.G. is needed here.

It states in figure 22.22 (p401) that:

       With bit7 = "1" a "0" in bits 0-6 enables the corresponding interrupt.

I'm sorry - but I just don't believe a word of it! Shouldn't this be:

       With bit7 = "1" a "1" in bits 0-6 enables the corresponding interrupt.

Indeed it even says this itself elsewhere:

       "bit 7 of the written byte should be set to 1. Each 1 in bits 0-6 will
       then SET the selected bit. A zero will case the corresponding bit to
       remain unaffected."

Seems to me to be yet another mistake in the book.
Any confirmations from people with truely working keyboards that the following
code is correct?

    case 14: /* interrupt enable reg */
        if (val & 0x80) /* enable */
            ier |= (val & 0x7f);
        else
            ier &= ~(val & 0x7f);
        break;

I've been going around the twist trying to get this working. I've spent several
nights this week already debugging until I spotted some code with an end of
comment typed as "* /" OOOPS!

I'm sure my 6522 code is correct. It just seems that the instrutions executed
don't manipulate it correctly. Very strange.

       James
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>