I have a project for which I have to implement parameter passing through stack between different protection levels. The information about the number of variables needed to be passed at the function must be given through DWORD Count of Call gate
For this project I have to:
A) Create 4 code segments
1) Real mode
2) Protected mode 16bit - privilege level 0
3) Protected mode 32bit - privilege level 0
4) Protected mode 32bit - privilege level 3
B) Enter protected mode - PL0
C) Adjust GDT, IDT, TSS, Stscks for the 3 privilege levels
D) Create the appropriate Call gate
E) Enter PL3
F) Execute a algorithm that uses a function at PL0 through Call Gate
G) Return to Real mode
My first question is how do I create the 4 code segments needed? can anyone help me?
Thanks you very much in advance