Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

SSE instructions in DOS programs? (Developers)

posted by alexfru(R), USA, 02.01.2019, 00:31

> What is the recomended way how to obtain whether I can use the SSE
> instructions?
> First step is clear - use the CPUID.
> But what about test whether the SSE are supported by the OS?
> Sure, I can just include some DPMI server which enables (supports) the SSE
> (cwsdpmi r7) but what about situation when already other DPMI server is
> running? Or somebody uses my program under Win95? (which does not have the
> SSE support)
>
> Internet says that it is enough to test the 9.bit and 10.bit in the CR4
> register. But "MOV CR4,AX" is a privileged instruction. So - what to do?

Try executing an instruction of interest and catch #UD.
It might be easier to do in real or virtual 8086 mode (I avoided interrupt/exception handling in protected mode under DPMI).

 

Complete thread:

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