flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > How is the "load" directive supposed to work? |
Author |
|
sid123 20 Feb 2015, 12:22
Hi,
I'm currently trying to generate a basic checksum from a given range of data, (not much really, just a sum of all the bytes in that range), I've come up with a macro like this: Quote:
As far as I understand, the above is going to keep looping until size is 0, and keep loading a byte from "current_pos", and then add it to the key variable. Finally, it will place the checksum at that position. Unfortunately, FASM errors out with: Code: flat assembler version 1.71.22 (16384 kilobytes memory <file name> [line]: load x byte from current_pos error: invalid macro arguments. I've checked the manual, and it says: Quote:
It talks about the "current addressing space", but I'm not sure what that means. -sid123 _________________ "Those who can make you believe in absurdities can make you commit atrocities" -- Voltaire https://github.com/Benderx2/R3X XD |
|||
20 Feb 2015, 12:22 |
|
revolution 20 Feb 2015, 12:52
You didn't show all your code so we don't know what you did. Naughty boy.
You can start by putting brackets around the arguments: Code: size = (end) - (begin) |
|||
20 Feb 2015, 12:52 |
|
baldr 20 Feb 2015, 19:59
sid123,
Code: error: invalid *macro* arguments. |
|||
20 Feb 2015, 19:59 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.