Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

User exception handler in C (Developers)

posted by Laaca Homepage, Czech republic, 16.08.2020, 21:27

The use of function "Signal" is very interresting.
It would be also cool to test in this way the SSE instruction.
The SSE must be supported by hardware (can be obtained with CPUID) but also switched on by software by privileged instruction (MOV CR4,???)

So the elegant way how to obtain the SSE is to check the CPUID status and then set the exception handler and just to try to call some.

But my question is - how to set the Signal back to original handler?

The setting the my handler is in the source: "signal(SIGILL, catch_rdtsc)"
but it would be nice to call something like "signal(SIGILL, orig_handler)"

---
DOS-u-akbar!

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 220 users online (0 registered, 220 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum