Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Using Dos for Real Time applications -> CLI (Developers)

posted by RayeR Homepage, CZ, 09.01.2013, 13:52
(edited by RayeR on 09.01.2013, 14:04)

> But then I have one more question : is it possible not to restore the
> original vector of an interrupt, without crashing the computer ?

I'm also not an interrupt expert to advice you, here are much experienced users about that. But I think that termination process of your program should be done following:
If there was interrupt enabled before your program with existing ISR, then simply do CLI, restore original vector, STI. I don't see problem why it should crash.
And if interrupt was not enabled and no existed ISR before, then simply reconfigure hardware to disable interrupt and you may leave your vector as is because interrupt will be disabled so nobody want to call this vector.
> So, when the interrupt happens, the computer tries to execute this
> random code, and crash. That's exactly what I observed.
This is probably your case.

This depends on what interrupt are you hooking. AFAIK e.g. serial ports or LPT/ECP has disabled INT generation and there's not installed any ISR by DOS. So it's up to you. But also there may be loaded some TSR which enabled interrupt, so you need to check and save state at the beginning of your program. In case of timer the interrupt is enabled after boot and BIOS and DOS ISRs are chained so you may chain yours ISR or disable/break chain and then restore it. Depends on what do you want.

---
DOS gives me freedom to unlimited HW access.

 

Complete thread:

Back to the forum
Board view  Mix view
22762 Postings in 2122 Threads, 402 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum