flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > repeat not work

Author
Thread Post new topic Reply to topic
Aster!x



Joined: 16 Jul 2004
Posts: 26
Aster!x 01 Feb 2010, 11:07
Code:
macro fill_bytes
{
  local _offset, _size
  repeat tbl_size/8
    load _offset dword from tbl+(%-1)*4
    load _size dword from tbl+4+(%-1)*4
    repeat _size
      store byte 0 at mydata+_offset+%-1
    end repeat
  end repeat
}    


Work wrong. Why ?
Post 01 Feb 2010, 11:07
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20300
Location: In your JS exploiting you and your system
revolution 01 Feb 2010, 11:11
Does not compile because some variables are not defined. At least give us a working file to compile. We have no idea what values you use for tbl_size, tbl or mydata. The error may be with those values.

However, I can see this problem:
Code:
    load _offset dword from tbl+(%-1)*8 ;Did you mean to put 8 here?
    load _size dword from tbl+4+(%-1)*8 ;Did you mean to put 8 here?    
Post 01 Feb 2010, 11:11
View user's profile Send private message Visit poster's website Reply with quote
Aster!x



Joined: 16 Jul 2004
Posts: 26
Aster!x 01 Feb 2010, 11:18
Quote:
Did you mean to put 8 here?


Yes. My mistake %)
Thanks.
Post 01 Feb 2010, 11:18
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.