Hi, all.
I embeded one asm line in my driver code like this
__asm mov eax, cr4
but the compiler told me “error C2094: label ‘CR4’ was undefined”, what is
wrong, are there any compile options need to be set?
best regards
yours brucie
Hi, all.
I embeded one asm line in my driver code like this
__asm mov eax, cr4
but the compiler told me “error C2094: label ‘CR4’ was undefined”, what is
wrong, are there any compile options need to be set?
best regards
yours brucie
Use __emit if you want to do this.
----- Original Message -----
From: “brucie”
To: “NT Developers Interest List”
Sent: Friday, December 20, 2002 12:29 PM
Subject: [ntdev] Mov eax, cr4
> Hi, all.
> I embeded one asm line in my driver code like this
> __asm mov eax, cr4
> but the compiler told me “error C2094: label ‘CR4’ was undefined”,
what is
> wrong, are there any compile options need to be set?
>
> best regards
> yours brucie
>
>
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>
brucie wrote:
I embeded one asm line in my driver code like this
__asm mov eax, cr4
but the compiler told me “error C2094: label ‘CR4’ was undefined”, what is
wrong, are there any compile options need to be set?
I can’t think of a single good reason to examine (or, worse yet, change)
CR4 in a driver, but you must have or you wouldn’t be asking. So what is
this good reason? Perhaps there is a legal and/or documented way to do
it.
Bear in mind that you can’t easily access the second tier of page tables
starting from CR4 because you need to map the physical addresses in the
first tier to virtual addresses. Besides which, physical memory
addresses don’t do you much good in DMA programming because they’re not
necessarily the same as the addresses that DMA controllers use.
–
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Now teaming with John Hyde for USB Device Engineering Seminars
Check out our schedule at http://www.oneysoft.com
That is odd… Maybe a case issue? This compiles ok in my code:
_asm mov eax, CR0
-Justin
At 03:29 AM 12/20/2002, you wrote:
Hi, all.
I embeded one asm line in my driver code like this
__asm mov eax, cr4
but the compiler told me “error C2094: label ‘CR4’ was undefined”, what is
wrong, are there any compile options need to be set?best regards
yours brucie
You are currently subscribed to ntdev as: zeppelin@io.com
To unsubscribe send a blank email to %%email.unsub%%
How do you feel about examining/changing CR0 in a driver?
-Justin
At 04:44 AM 12/20/2002, you wrote:
brucie wrote:
> I embeded one asm line in my driver code like this
> __asm mov eax, cr4
> but the compiler told me “error C2094: label ‘CR4’ was undefined”, what is
> wrong, are there any compile options need to be set?I can’t think of a single good reason to examine (or, worse yet, change)
CR4 in a driver, but you must have or you wouldn’t be asking. So what is
this good reason? Perhaps there is a legal and/or documented way to do
it.Bear in mind that you can’t easily access the second tier of page tables
starting from CR4 because you need to map the physical addresses in the
first tier to virtual addresses. Besides which, physical memory
addresses don’t do you much good in DMA programming because they’re not
necessarily the same as the addresses that DMA controllers use.–
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Now teaming with John Hyde for USB Device Engineering Seminars
Check out our schedule at http://www.oneysoft.com
You are currently subscribed to ntdev as: zeppelin@io.com
To unsubscribe send a blank email to %%email.unsub%%