News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Reverse a base 100 number

Started by V Coder, March 23, 2006, 06:11:07 AM

Previous topic - Next topic

V Coder

Hi, what's the quickest way to reverse a 100 number? Max value 99.

(x%10)*10 + (x\10)

Can we do this in parallel (SIMD)? Is there a better equation? Thanks.

EduardoS

Try AAM, AAD and xchg (with value in AL and result in AL):

AAM
XCHG AL, AH
AAD

Eóin

What do you mean by base 100, and reverse. Can you give an example.

I ask because a base 100 number with a max value of 99 is actually a single digit number.