Interrupt problem with Z180 CPU

Hi, I just can not run interrupt for Timer0 correctly. For example, I set I register to 10h and IL register to 70h and when interrupt takes place , CPU should start INT service routine from physical address 01074h. Am I right?

Thank you, Val

Reply to
Val
Loading thread data ...

No.

Only the high 3 bits of the vector are from IL, the low 5 bits of the vector are 00100 for Timer 0. Using your example, the address of the ISR will be fetched from 01034h, not 1074h.

Just to be clear, the vector table holds the address of the ISR, not the first instruction of the ISR.

Reply to
Gary Kato

vector

first

Using this example, the address of the ISR will be fetched from 01064h. Thank you.

Reply to
Val

I knew I should have drawn the bits on paper. :-)

Reply to
Gary Kato

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.