Re: Accessing debug registers with nasm

From: David Lindauer (spamtrap_at_crayne.org)
Date: 10/31/04


Date: Sun, 31 Oct 2004 08:53:40 +0000 (UTC)


devesh wrote:

> Hi Phil,
> Thanks a lot , but I still don't get it why xor dr6 ,dr6 should give an
> error . Because dr6 and dr7 are supposed to be written to for setting
> up debugging . Can you guide to some online reference regarding this ,
> that would be great.
> Sincerely
> Devesh Agrawal

the way intel specified the debug and control (and test) register sets, the
only thing you can do with those registers is move them to and from general
purpose registers. you can't do anything else like math functions with
those registers. If you want to clear dr6 you can do:

xor eax,eax
mov dr6,eax

there really is no shortcut for this, the ONLY assembly language
instruction that will work with these registers is mov.

David



Relevant Pages

  • Re: which way is faster?
    ... For example, I can add to allocated variables, and I can move them to ... addition in the registers is faster. ... MOV eax, ... cycles I read, inclusive, Using your previously posted technic. ...
    (alt.lang.asm)
  • Re: howto: MOV EAX, <64bit value> ?
    ... mov eax, ... MOV and the same number of 'pull' instructions on the other. ... wise compression routine to get them to fit into the 8-bit registers. ...
    (alt.lang.asm)
  • Re: Help in getting application to access I/O space
    ... pointers for how to do 32-bit I/O space accesses, ... BYTE inpb(USHORT addr) ... mov dx, addr ... the registers are mapped as offsets into "I/O Space". ...
    (microsoft.public.windowsce.embedded)
  • Re: Help in getting application to access I/O space
    ... BYTE inpb(USHORT addr) ... mov dx, addr ... the registers are mapped as offsets into "I/O Space". ...
    (microsoft.public.windowsce.embedded)
  • Re: Help in getting application to access I/O space
    ... BYTE inpb(USHORT addr) ... mov dx, addr ... the registers are mapped as offsets into "I/O Space". ...
    (microsoft.public.windowsce.embedded)