Is it possible to use 32-bit registers / instructions in real mode?

I got confused by a simple build problem while learning simple os source code.

On this website: http://wiki.osdev.org/Babystep7, the following code is for switching from real mode to protected mode

mov  eax, cr0
or al,1
mov  cr0, eax

I know how to switch from real mode to protected. But my question is that the program is still in real mode, how can it use 32-bit registers or instructions?

Is it possible to use 32-bit registers / instructions in real mode?

+5
source share
7 answers

( ), 16- . , 32- .

" " (66h), . , 16- , 32-. , , 32- , 16 . ( 67h .)

, 32- 16- . , 32- 16- .

, 64- , . " ".

+4

, , CPU, , CPU.

, , eax, [eax].

. Intel.

+4

, 32- . 32- CR0 CR0 (PE). PE (mov cr0, eax). , 32- .

0

. 16- ( ), - Windows ( 3,1 9 ), 64 API Windows, , . , () , , 40 , 16- .

- , , 32- , 16-. 16- , , . ( , ) 32- emit, , , .

0

32- , . , .

0

Perhaps you can use LoadAll opcode 0F07h , which gives you 32-bit 16-bit real-time access.

0
source

All Articles