What you're trying to do is not useful to an application so why are you tinkering around in there? Most programmers who work in assembly can go their entire lives without working with system instructions. Are you planning on designing your own operating system or modifying an existing one?

Yeah, I know it is not important to an application, and mainly for building an OS. But i aint buildin an operating system, I'm not even using that code i stuck up in my last post in my program, this was only for trying to find out if I could access, or read, entries from the GDT, so i could follow and debug my program for my own learning. Or are we not allowed to get information from that?

Well, its not so much debugging, really just more, following the process of my application.

Ok, so i know that I can access the address of the GDT, but is it possible to access the entries with in it?

For example, if i wanted to find the Virtual Address of the stack segment, and the ss register was equal to 0x0023, this then means that to find that address we must find the entry with in the GDT,
0x23 meaning entry: 2 of the GDT? right? So when i try to access this, or at least I think I am, the program terminates. Is this reason because I do not have access to this?

ya ya, I've had those downloaded for a long time, I use those alot, but I doesn't seem to inform, or at least I cannot find, whether or not reading entries from the GDT is allowed. Which is why i came here. This will clear things up for me because if reading entries from the GDT are not allowed, this explains why my program is screwin up, otherwise, I've made the fault some where when I typed in the numbers. Thanks for the help though.

*PROTECTED MODE STUFF*
If you are running as an application program,
then you application is most likely running in another ring
of the processor and most likely will not be able to
execute privileged instructions like SGDT and LGDT.
Applications programs address space is limited by the LDT,
and does not correspond to GDT entries.
A segment selector used in segment registers in protected
mode acts as an index into a table of segment descriptors.
Segment descriptors contain the size,attributes,and beginning
linear address of segments.
The beginning linear address of a descriptor table
is stored in GDTr and LDTr registers, the processor
multiplies a selector by 8 to index into these entries.
Hope this helps.

great, yeah, so if I'm not able to access SGDT, and if i still used it, what would be the meaning of the value that it returned, becuase i got one. Also, does this mean the GDT is located in a different 4GB RAM area? but the LDT is located in the same Ram as the program? or at least the descriptor tables point to segments that are in the same RAM as my application, right. Basically I'm trying to find these segmented areas in the Applications RAM, wondering if its possible.

You cannot access the GDT from within an application. The operating system aqnd hardware, between the two of them, conspire to ensure that an application can only access the memory allocated to it. They do that to prevent an application from trashing another applications code and data, or, even worse, the operating system's code and data.

A GDT entry contains a segment address (usually set to zero in modern operating systems), a 32 or 48 bit offset address (depending upon whether it is a 32 bit or 64 bit processor), and various flags all mixed up togetrher. The flage determine such things as:

Can you read from the segment?
Can you write to the segment?
Does the segment contain code or data?
Is the segment present in memory (rather than swapped out to disk)
The segment's privilege level

Hi. so this is actually a continuation from another question of mine[Here](https://www.daniweb.com/programming/software-development/threads/506795/dynamically-add-values-into-datagridview-cell-from-listbox-vb2010) but i was advised to start a new thread as the original question …

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...