Page 1 of 1

(nasm) New segment / 16 and 32 bits segment / end of segment

Posted: Sun Sep 29, 2013 2:41 pm
by yee1
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

Code: Select all

myNewSegment segment use16
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.

Re: (nasm) New segment / 16 and 32 bits segment / end of seg

Posted: Tue Oct 01, 2013 4:00 pm
by qw
Sorry but this is basic knowledge that you can easily find in the manual.