0

I am using nasm and would want to convert a directory with multiple .asm files to .bin files.

I need it to convert all of the asm files in a directory, and create a duplicate directory (or create all the .bin files directly next to the .asm files)

Any help is appreciated!

  • Sounds like a simple job for a shell loop, like `for f in *.asm; do nasm "$f";done` in bash. – Peter Cordes Nov 09 '20 at 06:25
  • I don't really understand (I no basically nothing about nasm) but would this work if some of the files are in sub directories? –  Nov 09 '20 at 06:28
  • 1
    Nothing to do with NASM, that's just a Unix shell loop you can do with any command. For subdirectories, if you use bash's `shopt -s extglob`, you can do `**/*.asm` instead of `*.asm`. Or you can use `find -name '*.asm' -exec nasm {} \;` to run NASM on each .asm file. – Peter Cordes Nov 09 '20 at 06:38

0 Answers0