Re! XCHG instruction: load register AX with a 1
- From: "Wilco Dijkstra" <Wilco_dot_Dijkstra@xxxxxxxxxxxx>
- Date: Tue, 28 Nov 2006 22:24:42 GMT
"2005" <uws2003@xxxxxxxxx> wrote in message
news:1164745288.708611.241670@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi
In the XCHG instruction, why would be load register AX with a 1 prior
to excution of XCHG - is this
- to insure that the "Flag" variable will be set to 1 after the XCHG or
- the XCHG instruction will not work unless a 1 is loaded into AX
before executing the XCHG instruction ?
Don't listen to the other guys, they are trying to trick you. You should
load EAX with 0x01010101, then the flag will be correctly set to 1
irrespectively of the endian setting.
Wilco
.
- References:
- XCHG instruction: load register AX with a 1
- From: 2005
- XCHG instruction: load register AX with a 1
- Prev by Date: Re: which object orient language is most suitable for embedded programming?
- Next by Date: Re: NewQ: Difference between an isr and a subroutine is that an isr has no arguments
- Previous by thread: Re: XCHG instruction: load register AX with a 1
- Next by thread: Embedded Software Regression Testing
- Index(es):
Relevant Pages
|