Hi,
I checked the pentium manuals, could not find any reference to these statements as listed below.
andl $0x7FFAFFD1, %eax /* PG,AM,WP,NE,TS,EM,MP = 0 */ orl $0x60000001, %eax /* CD, NW, PE = 1 */
The syntax for and is reverse and <register> <immediate value> Whereas the code reads andl <immediate value> <register>
Could someone please help me on this or redirect to exact reference for the above statements.
Regards Deepak
you really need to get a pengium manual.
Where do I get this one. Is it some Linux Man Page. Could you please give me the link where I can look for it.
Thanks and Regards Deepak
----- Original Message ----- From: "ron minnich" rminnich@lanl.gov To: dkotian3@vsnl.net Cc: linuxbios@clustermatic.org Sent: Monday, April 21, 2003 9:34 PM Subject: Re: entry16.inc code doubt
On Mon, 21 Apr 2003 dkotian3@vsnl.net wrote:
***Extract*** andl $0x7FFAFFD1, %eax /* PG,AM,WP,NE,TS,EM,MP = 0 */ orl $0x60000001, %eax /* CD, NW, PE = 1 */
you really need to get a pengium manual.
Then it will all make sense.
ron
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
_______________________________________________ Linuxbios mailing list Linuxbios@clustermatic.org
On Tue, Apr 22, 2003 at 12:17:08PM +0500, dkotian3@vsnl.net wrote:
I checked the pentium manuals, could not find any reference to these statements as listed below.
andl $0x7FFAFFD1, %eax /* PG,AM,WP,NE,TS,EM,MP = 0 */ orl $0x60000001, %eax /* CD, NW, PE = 1 */
The syntax for and is reverse and <register> <immediate value> Whereas the code reads andl <immediate value> <register>
Could someone please help me on this or redirect to exact reference for the above statements.
Hi.
The two instructions you quote are taken out of context and are by themselves completely meaningless.
They are mere bit operations on registers: andl performs a bitwise AND of a register (the eax register, in this case) and the 0x7ffaffd1 immediate value, and stores the result back into the register. orl performs a bitwise OR of a register (again eax) and the 0x60000001 immediate value, and stores the result back into eax.
Before these two instructions I'm guessing that there is a line reading mov %eax, cr0
and following them, there is a line reading mov cr0, %eax
(cr0 above may also be %cr0, I'm more familiar with intel assembly syntax.)
Now, this puts the bit mangling in a totally different perspective. cr0 is the Configuration Register 0, which among other things contains the PE bit, as indicated by the comment following the or instruction. PE controls whether the CPU is in protected mode or not.
To connect the dots for you, your two instructions combined with my two instructions will set a number of different flags in cr0, among other things switching the CPU to protected mode if not already in it.
Hope this helps, and gives a few pointers.
//Peter
Greetings,
What you're seeing is the difference between Intel syntax (used in their assemblers) and AT&T syntax used in the GNU assembler. The big differences are that the operands are reversed, and the mnemonic (opcode) explicitly refers to the operand size by appending one of b, w, or l for byte, word, or long (1, 2, or 4 bytes).
G'day, sjames
On Tue, 22 Apr 2003 dkotian3@vsnl.net wrote:
Hi,
I checked the pentium manuals, could not find any reference to these statements as listed below.
andl $0x7FFAFFD1, %eax /* PG,AM,WP,NE,TS,EM,MP = 0 */ orl $0x60000001, %eax /* CD, NW, PE = 1 */
The syntax for and is reverse and <register> <immediate value> Whereas the code reads andl <immediate value> <register>
Could someone please help me on this or redirect to exact reference for the above statements.
Regards Deepak
you really need to get a pengium manual.
Where do I get this one. Is it some Linux Man Page. Could you please give me the link where I can look for it.
Thanks and Regards Deepak
----- Original Message ----- From: "ron minnich" rminnich@lanl.gov To: dkotian3@vsnl.net Cc: linuxbios@clustermatic.org Sent: Monday, April 21, 2003 9:34 PM Subject: Re: entry16.inc code doubt
On Mon, 21 Apr 2003 dkotian3@vsnl.net wrote:
***Extract*** andl $0x7FFAFFD1, %eax /* PG,AM,WP,NE,TS,EM,MP = 0 */ orl $0x60000001, %eax /* CD, NW, PE = 1 */
you really need to get a pengium manual.
Then it will all make sense.
ron
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
Linuxbios mailing list Linuxbios@clustermatic.org
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
On Tue, 22 Apr 2003 dkotian3@vsnl.net wrote:
I checked the pentium manuals, could not find any reference to these statements as listed below.
andl $0x7FFAFFD1, %eax /* PG,AM,WP,NE,TS,EM,MP = 0 */ orl $0x60000001, %eax /* CD, NW, PE = 1 */
You need to learn how to read Gnu Assembler. This is GNU assembly code.
ron