🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.asm
Article #2202

Re: Podobna zagadka

#2202
From: Andrzej Grażyński
Date: Sun, 11 Apr 2010 21:37
25 lines
1492 bytes
Bernard pisze:
> On 2010-04-09 23:00, Andrzej Grażyński wrote:
>> Dane jest pole o adresie początku w ESI i długości w bajtach w ECX.
>> Należy odwrócić kolejność BITÓW.
> 
> xlop:
>     lodsb
>     mov    ah, al
>     and    ax, 0x55aa
>     shr    al, 1
>     aad    2
>     mov    ah, al
>     and    ax, 0x33cc
>     shr    al, 2
>     aad    4
>     ror    al, 4
>     xchg    al, [esi + ecx - 2]
>     ; i tu to samo, co powyżej - 9 instrukcji
>     mov    [esi - 1], al
>     sub    ecx, 2
>     ja    xlop
> 
> razem 23 instrukcje na 1 obieg pętli

A nie lepiej użyć BT, BTS i BTR?
Technical Details
Message-ID: <hptffo$s3o$1@news.onet.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.cyf-kr.edu.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!not-for-mail
References: <hpo4ih$5ub$2@news.onet.pl> <hptb15$6q6$1@newsread1.aster.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.cyf-kr.edu.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!not-for-mail
From: Andrzej Grażyński <grazynsk@petex.com.pl>
Newsgroups: pl.comp.lang.asm
Subject: Re: Podobna zagadka
Date: Sun, 11 Apr 2010 23:37:38 +0200
Organization: http://onet.pl
Lines: 25
Message-ID: <hptffo$s3o$1@news.onet.pl>
References: <hpo4ih$5ub$2@news.onet.pl> <hptb15$6q6$1@newsread1.aster.pl>
NNTP-Posting-Host: public-gprs66311.centertel.pl
Mime-Version: 1.0
X-Trace: news.onet.pl 1271021882 28792 91.94.132.17 (11 Apr 2010 21:38:02 GMT)
X-Complaints-To: niusy@onet.pl
NNTP-Posting-Date: Sun, 11 Apr 2010 21:38:02 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
In-Reply-To: <hptb15$6q6$1@newsread1.aster.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit