‫Before we continue, remember that in previous lectures I have explained, the real mode is a compatibility
‫mode, that all modern intel processes starting when they are switched on this compatibility mode,
‫mimics the processes from many years ago when the processor is in this state.
‫It is called real mode.
‫In real mode.
‫We can only access one megabyte of RAM.
‫It does not matter if you have four gigabytes of RAM plugged into your computer.
‫Real mode is based on the original electronics design, the one from the 1970s.
‫When the processor is in real mode, you have no security whatsoever.
‫Have you ever run a program on your computer and it's crashed and then your operating system says this
‫program was terminated?
‫Something like that will last thanks to security.
‫Modern operating systems can talk with the processor and set up specific security rules, they can then
‫prevent user processes from doing very malicious actions, such as destroying the kernel or the operating
‫system while in real mode.
‫Only 16 bits can be accessed at one time in decimal terms.
‫That means we can access numbers from zero to sixty five thousand five hundred thirty five in real mode.
‫Memory is access through the segmentation memory model.
‫Simply put, memory can be accessed through the use of segments and offsets, more will be discussed
‫on this in another lecture, as I have already said, when in real mode, only one megabyte of RAM is
‫accessible and it doesn't matter if you have four gigabytes of RAM.
‫Real mode is based on the original eighty six design.
‫So when your processor is running in real mode, it acts like the older intel processes from the 1970s.
‫We can use the 086 process as an example of this, as a matter of fact, we will be using documentation
‫for the 086 process going forward.
‫So whilst we're in real mode, we have the same limitations as the older processes from many years ago.
‫All of our code in real mode is required to be 16 bits.
‫So if you imagine in today's modern world, we have 32 bit programs and 64 bit programs.
‫Now, imagine 16 bit programs, we can override this behavior on a per instruction basis, so it will
‫use the 32 bit equivalent, but we will avoid it while in real mode.
‫We have absolutely no security for memory and we have no security for we use the programs can destroy
‫our operating system with no way of us to stop them.
‫There's a reason why in modern operating systems, a simple program can't just destroy your computer.
‫It's because modern operating systems set up rules with the processor to protect areas of memory.
‫It restricts user programs from accessing hardware directly.
‫This is done on the processor itself.
‫The operating system or the kernel, I should say, just tells the processor that this is a user program
‫so it shouldn't have access to hardware and it shouldn't have access to protected memory.
‫The kernel can then act as a layer between user land and kernel and kernel, and that means any code
‫running with the maximum privileges possible.
‫This is also known as ring zero.
‫USA land is ring three, it does not have access to Hawaii directly, it has to talk to our colonel
‫and ask for things.
‫It can't go ahead and do things itself.
‫The colonel can restrict what memory use, the land can access and all of that sort of stuff.
‫We'll discuss more about ring zero and ring three as we go through this course.
‫This was just a brief explanation.
‫So when in real MO we can only access eight and 16 bit registers, we can override this behavior on
‫a per instruction basis, as I've already said.
‫But we do not want to do that because we can only access 16 bits at one time.
‫It means the highest number we can access is sixty five thousand five hundred thirty five.
‫This means we can only access an offset in memory of sixty five kilobytes.
‫We can't go higher than that.
‫The reason we can address one megabyte is because we take the segment registers into account.
‫More will be explained on this in another lecture.
‫Operations can only be done with sixteen bit numbers unless we override the instruction, as I said
‫earlier.