HW-2:
Develop an assembly program that switch your processor from 16-bit real mode (rm) to 32-bit protected mode (pm) and switch back to 16-bit rm again. In this program we want to demonstrate the basic capabilities of interrupts/exceptions in pm. For this, you should write an interrupt service routine (ISR) for the interrupt type of “0X20h” and do any perquisite tasks to make this int. operational. Please consider the following notes carefully:
After switching to pm, show the message of “The CPU is in PM now!” in the first line of screen.
You should invoke the software interrupt by “int 0x20h” command in pm.
In addition to GDT, you should fll the interrupt descriptor table for all the first 32 int. types and the int. type of 0x20h.
The ISR for 0x20h, just shows the message of “Int 0x20h was invoked!” in the second line of the screen and returns.
Restore the IDTR for rm and re-enable the rm’s interrupts when switching back to rm for proper operation of the system.
You also should write a common handler for all ints/exceptions with type of <=0x1fh in pm. This default handler just shows the message of “Some exception was occurred!” on the screen and freezes.