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 Japheth Homepage, Germany (South), 23.08.2020, 20:36

> Your "mov eax,0" confused me. Apparently you're clearing the top bits of
> the return value in advance, right?

I assume yes. It's not necessary, however, because you can use the 0x66 prefix:


     db 66h         ;makes smsw copy all 32 bits to EAX
     smsw ax           


with LMSW, this trick won't work.

On newer cpus, the UMIP flag in CR4 can be set, which will make SMSW a privileged instruction as well.

---
MS-DOS forever!

 

Complete thread:

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