Re: 68hc11 and pseudovector.
zorro said:
Hi Debracom
You should put the addres of your interrupt service routine (ISR) at the “true” vector locations, that are in ROM.
Your assembly source could look like this
ORG ITOC3VCT
FDB irq
ORG ITOC5VCT
FDB irq2
where ITOC3VCT and ITOC5VCT are defined as the addresses of interrupt vectors (at the end of memory map in 68hc11, from 0xFFC0 to 0xFFFF).
In this way, the addresses of the ISRs remain fixed. It is good for the application. The pseudovectors are used when you use a monitor program in ROM for debugging, and the adresses of the ISR change each time you download the program in RAM.
Let me know if this is not clear.
Regards
Z
okay I think I get where this is going. I do not have a monitor program in the ROM. though I don't completely understand how to embed this in the program.
Do I have to set the codes
ORG ITOC3VCT
FDB irq
ORG ITOC5VCT
FDB irq2
before the program, after it. or in my initialisation(which I think). or am I completely wrong here
.
for instance, some lines in the initialisation are like this :
ldaa #0x7E ;input code 'jump' to
staa itoc5 ;ram-pseudovector for
staa itoc3 ;interrupt with itoc3&5
ldd #irq ;input address for subroutines.
std itoc3+1
ldd #irq2
std itoc5+1
this all should be changed in the ORG ITOC.... lines ??
Also in the subroutine IRQ there are some lines :
ldd #2000
addd toc3
std toc3
should these be changed too?
thank you for helping, I should never have found it on my own!