flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Am I forced to use 8086's instructions in real mode?

Author
Thread Post new topic Reply to topic
emc



Joined: 20 Aug 2011
Posts: 90
Location: France
emc 26 Aug 2011, 16:10
Hello,

I would want know if I am forced to use only the 8086's instructions in real mode, because I am trying to write a little kernel (real mode) that checks if the CPU has the SSE4 set, using CPUID (that is not in the 8086 set) instruction.

Regards.

_________________
;; emc
Post 26 Aug 2011, 16:10
View user's profile Send private message Reply with quote
DJ Mauretto



Joined: 14 Mar 2007
Posts: 464
Location: Rome,Italy
DJ Mauretto 26 Aug 2011, 17:16
Quote:
I would want know if I am forced to use only the 8086's instructions in real mode


NO Very Happy

Today 8086 cpu is rare, anyway you can write code that checks the processor type..

* FROM INTEL *

Check for 8086:
Bits 12-15 of the FLAGS register are always set on the 8086 processor

Check for 286:
Bits 12-15 of the FLAGS register are always clear on the
286 processor in real-address mode.

Check for 386 processor:
The AC bit, bit #18, is a new bit introduced in the EFLAGS
register on the Intel486 processor to generate alignment faults.
This bit cannot be set on the Intel386 processor.


Check for 486 processor:
Checking for ability to set/clear ID flag (Bit 21) in EFLAGS
which indicates the presence of a processor with the CPUID instruction.

Have Fun
Wink

_________________
Nil Volentibus Arduum Razz
Post 26 Aug 2011, 17:16
View user's profile Send private message Reply with quote
emc



Joined: 20 Aug 2011
Posts: 90
Location: France
emc 26 Aug 2011, 17:23
Ok, thanks for these informations DJ Mauretto Very Happy
Post 26 Aug 2011, 17:23
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.