(nasm) New segment / 16 and 32 bits segment / end of segment
Posted: Sun Sep 29, 2013 2:41 pm
Hey,
1st question
I am using NASM and i want to make new segment (want to prepare gdt to activate protected mode).
I start my new segment like this
Below that line of code I have put some instances of structure for GDT. But how to end it like "myNewSegment ends" for FASM ?!
2nd question
I want to get size of above myNewSegment segment. I want to do somephing like that "sizeOfmyNewSegment = $ - beginOfmyNewSegment" (pseudocode). How to do this ?
3rd question
What is the difference between use16 and use32 when defining a segment ? I know it means 16 and 32 bits, but could you possible describe me what is it for ?
Thank you.
1st question
I am using NASM and i want to make new segment (want to prepare gdt to activate protected mode).
I start my new segment like this
Code: Select all
myNewSegment segment use16
2nd question
I want to get size of above myNewSegment segment. I want to do somephing like that "sizeOfmyNewSegment = $ - beginOfmyNewSegment" (pseudocode). How to do this ?
3rd question
What is the difference between use16 and use32 when defining a segment ? I know it means 16 and 32 bits, but could you possible describe me what is it for ?
Thank you.