Author Topic: Having problems with .while Cnt < 32  (Read 6529 times)

hfheatherfox07

  • Member
  • ***
  • Posts: 464
Re: Having problems with .while Cnt < 32
« Reply #15 on: January 18, 2013, 07:59:39 PM »
Thanks jj2007  :t
Never thought of that  :redface:
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

dedndave

  • Member
  • *****
  • Posts: 8825
  • Still using Abacus 2.0
    • DednDave
Re: Having problems with .while Cnt < 32
« Reply #16 on: January 18, 2013, 11:59:44 PM »
it's an index into a string, starting at 0
in this case, i think you want MOVZX

dedndave

  • Member
  • *****
  • Posts: 8825
  • Still using Abacus 2.0
    • DednDave
Re: Having problems with .while Cnt < 32
« Reply #17 on: January 20, 2013, 08:29:36 AM »
.Repeat
  ...
    mov eax, mem1
.Until mem2>eax  ; or whatever


Note that .Repeat ... .Until is a bit faster and shorter than .While - if you are sure that the loop must be taken at least once, use .Repeat.
thanks for the tip, Jochen - i knew there had to be a better way   :t