flat assembler
Message board for the users of flat assembler.

Index > Windows > Base Converter

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
roticv



Joined: 19 Jun 2003
Posts: 374
Location: Singapore
roticv
It can reduce 2 cmp to 1 cmp. For example
Code:
 add     ecx,[current_base]
  cmp     eax,ecx
     ja      .finish
     cmp     eax,'0'
   jb      .finish
    

You can do something like
Code:
lea edx, [eax-'0']
cmp edx, [current_base]
ja .finish
    
Post 29 Sep 2003, 11:54
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
Tommy



Joined: 17 Jun 2003
Posts: 489
Location: Norway
Tommy
Ok, I see... I got:
Code:
mov     ecx,'0'-1
lea     edx,[eax-'0']
cmp     edx,[current_base]
jae     .finish 
    
Thanks!
Post 29 Sep 2003, 12:03
View user's profile Send private message Visit poster's website Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
Thanks for fixing the bug, roticv! I couldn't figure myself what's wrong...
Post 29 Sep 2003, 14:04
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.