tom.storey
Experienced Member
Hi all,
Sorry if this isnt the correct place to post, please move if there is somewhere better.
Im planning to build a card for my XT that will contain a bunch of stuff, and part of this will be to include a socket for an option ROM that I can use for development purposes.
But I have a question. Lets say you have an option ROM that wants to intercept an interrupt. There may or may not already be an existing ISR installed at a particular vector, and your option ROM potentially needs to become part of a chain, potentially calling that existing ISR.
How or where does one save the address of that existing ISR so that it can be called after your own ISR is complete?
So far the best solution I can come up with is to have some RAM that lives within the option ROM's address space and constitues the last 512 bytes (one option ROM "block" size) before the next 2k boundary. This means your option ROM size can be reported as n-1 so that the last 512 bytes doesnt get counted as part of the ROM, and the next option ROM can start immediately after. Unless I misunderstand how that bit works...
Ive seen that some option ROMs copy the existing vector to a new vector location, such that maintaining the chain simply becomes a matter of calling the address at that other vector location (or doing an INT Xh for it). But that sounds like a bit of a nightmare if you just happen to choose the same vector that some other piece of software also happens to use, or vice versa...
Insight appreciated.
Thanks!
Sorry if this isnt the correct place to post, please move if there is somewhere better.
Im planning to build a card for my XT that will contain a bunch of stuff, and part of this will be to include a socket for an option ROM that I can use for development purposes.
But I have a question. Lets say you have an option ROM that wants to intercept an interrupt. There may or may not already be an existing ISR installed at a particular vector, and your option ROM potentially needs to become part of a chain, potentially calling that existing ISR.
How or where does one save the address of that existing ISR so that it can be called after your own ISR is complete?
So far the best solution I can come up with is to have some RAM that lives within the option ROM's address space and constitues the last 512 bytes (one option ROM "block" size) before the next 2k boundary. This means your option ROM size can be reported as n-1 so that the last 512 bytes doesnt get counted as part of the ROM, and the next option ROM can start immediately after. Unless I misunderstand how that bit works...
Ive seen that some option ROMs copy the existing vector to a new vector location, such that maintaining the chain simply becomes a matter of calling the address at that other vector location (or doing an INT Xh for it). But that sounds like a bit of a nightmare if you just happen to choose the same vector that some other piece of software also happens to use, or vice versa...
Insight appreciated.
Thanks!