Search code examples
assemblynasmfasm

FASM - compacting "buffer db 0, 0, 0, 0, 0, 0, ..."


I was lucky enough to run into some NASM code that compiled fine in FASM changing just a single line;

buffer times 64 db 0

This works fine in NASM, but not in FASM - i had to write:

buffer db 0, 0, 0, 0, 0, 0, ...

There must be a more compact way to do this.


Solution

  • You are probably looking for:

    buffer db 64 dup(0)