Re: 8051 Speed Optimization
- From: Tilmann Reh <tilmannreh@xxxxxxxxxxxxx>
- Date: Thu, 29 Sep 2005 08:27:15 +0200
Tilmann Reh schrieb:
> You could also use CJNE for the comparison - it also sets carry, but is
> non-destructive, so you don't need to reload A from XRAM for each test:
>
> movx a,@dptr
> cjne a,ar0,$+3
> mov mDataOut.0,c
> cjne a,...
> mov ...,c
I forgot to mention: The polarity of the output bits is opposed to that
of your code. You'd have to negate the data before comparison or CPL the
output bits afterwards (if you can't switch the polarity otherwise).
--
Dipl.-Ing. Tilmann Reh
http://www.autometer.de - Elektronik nach Maß.
.
- References:
- 8051 Speed Optimization
- From: alexmchale@xxxxxxxxx
- Re: 8051 Speed Optimization
- From: Tilmann Reh
- 8051 Speed Optimization
- Prev by Date: Re: 8051 Speed Optimization
- Next by Date: Re: Bit manipulation
- Previous by thread: Re: 8051 Speed Optimization
- Next by thread: Anwenderprogramm für Flash ins eb40a mit Tantino (Hitex)
- Index(es):