[ mv. @ 11.01.2003. 13:10 ] @
Šta je to Machine Status Word i za šta koji bit služi ? postavio sam ovo pitanje na assambler forumu, ali niko ne odgovara, a pošto je vezano za sistemsko programiranje i protected mode, postavljam ga i ovdje.
[ random @ 11.01.2003. 16:38 ] @
To je ekstenzija flags registra, obezbeđuje zgodne flagove za protected mode, za process i memory management kod višekorisničkih op. sistema.

Code:

      |31|30-5|4|3|2|1|0|  Machine Status Word
        |   |  | | | | |____ Protection Enable (PE)
        |   |  | | | |_____ Math Present (MP)
        |   |  | | |______ Emulation (EM)
        |   |  | |_______ Task Switched (TS)
        |   |  |________ Extension Type (ET)
        |   |__________ Reserved
        |_____________ Paging (PG)

Bit  0  PE Protection Enable, switches processor between protected and real mode
Bit  1  MP Math Present, controls function of the WAIT instruction
Bit  2  EM Emulation, indicates whether coprocessor functions are to be emulated
Bit  3  TS Task Switched, set and interrogated by coprocessor on task switches and
           when interpretting coprocessor instructions
Bit  4  ET Extension Type, indicates type of coprocessor in system
Bits 5-30  Reserved
Bit 31  PG Paging, indicates whether the processor uses page tables to translate
           linear addresses to physical addresses


Takođe videti global descriptor table register (gdtr), local descriptor
table register (ldtr)
, interrupt descriptor table register (idtr) i task register (tr).
[ Nikola Krivokapic @ 11.01.2003. 23:46 ] @
MSW je 16-to bitni registar kod 286-ice,koji je kod 386 uvršten u 32 bitni kontrolni registar cr0,tako da prvih 16 bita cr0 registra predstavlja machine status word.
Evo ovo su prvih 16 bita cr0 registra (msw) kod 386+ :

PE bit 0 protected ili real mode
MP bit 1 jeli aktivan matematicki komprocesor
EM bit 2 emulation
TS bit 3 task switched
ET bit 4 extension type
NE bit 5 numericke greške
WP bit 16 write protect

Toliko od mene ispravite me ako nesto ne valja...