Hi everyone!

I'm trying to understand interrupts, more specifically how to set them. Now I know that the interrupt level encoding table is:


IPL2 IPL1 IPL0 Interrupt Level

1 1 1 0
1 1 0 1
1 0 1 2
1 0 0 3
0 1 1 4
0 1 0 5
0 0 1 6
0 0 0 7

What I don't understand is how you get your logic from your input.

Here is the answer I have, followed by the question:


INPUTS OUTPUTS
A B IPL2 IPL1 IPL0 LEVEL
1 1 (both open) 1 1 1 0
0 0 (both closed) 1 1 1 0
0 1 (A is on) 1 0 1 2
1 0 (B is on) 1 0 0 3



Write a complete 68000 assembly program that will perform the following 2 operations invoked by the corresonding external interrupt requests as indicated.



Input switches (active low) Interrupt level Desired operation
ADD bytes level 2 The 4 bytes of D0 are ADDed up and placed in the
least significant bit position in D0

OR bytes level 3 The 4 bytes of D0 are ORed together and placed in
the least significant byte position of D0


As I've said, what I don't understand is how I get the outputs from the inputs I have. I understand how AND and OR work, but I don't get this. On a side note, this is to study for an exam, not for a homework.

Any help would be appreciated. Thanks in advance!
Posted on 2003-11-24 16:50:38 by stimpyzu