As far as I understand, that information is not something you "get" with code. You need to know what platform you're coding for before you start coding. For example, if you want to write a program for the family of x86 or x86-64 CPU's, you can refer to the Intel manuals for this information. On the other hand, if you want to write a program for an ARM CPU, you would get the manual from ARM