Questions tagged [protected-mode]

x86 protected mode allows system software to support virtual memory, paging and preemptive multi-tasking.

x86 protected mode allows system software to support virtual memory, paging and preemptive multi-tasking.

  • Protected mode was first added to the x86 architecture in 1982, with the release of Intel's 80286 processor, and later extended with the release of the 80386 processor in 1985.
  • To maintain backward compatibility, x86 processors begins executing instructions in real mode.

To enter protected mode:

  • The Global Descriptor Table (GDT) must first be created with a minimum of three entries: a null descriptor, a code segment descriptor and data segment descriptor.
  • In an IBM-compatible machine, the A20 line (21st address line) also must be enabled to allow the use of all the address lines so that the CPU can access beyond 1 megabyte of memory.
  • Then the PE bit must be set in the CR0 register and a far jump must be made to clear the prefetch input queue:
; set PE bit
mov eax, cr0
or eax, 1
mov cr0, eax

; far jump (cs = selector of code segment)
jmp cs:@pm

@pm:
; Now we are in PM.
214 questions
-1
votes
1 answer

Entering 32 bit protected mode

I am developing an operating system. As from the references, I have to enter to 32 bit protected mode from 16 bit real mode. In the step, its use an instruction as: bits 32 But my assembler says that is illegal it also use instruction like: org…
MaheshMV
  • 11
  • 4
-1
votes
1 answer

Android Downloaded HTML content should not coping using file managers / through the USB connection

I'm developing a android application which is downloading contents from a API as a zip file and extract it in to the assets folder in the app.Then using the web view in the app can load that content. How can i prevent user from directly access the…
-2
votes
2 answers

Disk Read/Write Fault Using Ports in Assembly

My O/S is now in protected mode so i can not access to disk using interrupts now.And I do not know how to switch to v86 mode.I need to use ports to disk access. I decided to try the code which i found on the forum.osdev.org.In the emulator,It shows…
user2590769
  • 75
  • 1
  • 10
-3
votes
1 answer

How can I access the first 1MB of RAM in Windows programming (Protected Mode)?

How can I access the first 1 MB of RAM directly in Windows programming (Protected Mode)? For example to write to the video part. Can I use DPMI to solve all problems?
john
  • 1
1 2 3
14
15