Ben Ishak
Ben Ishak

Reputation: 679

nasm %include error: file.inc:1: error: interminable macro recursion

Something is happening with me while trying to compile my nasm program i want to include a Lookup-Table with 10^6 values

table: dd 0x000000, ..................... 0x999999

then i included it in my ASM Program

%include "file.inc"

error: file.inc:1: error: interminable macro recursion

Upvotes: 1

Views: 383

Answers (1)

Frank Kotler
Frank Kotler

Reputation: 3119

Oh my! I'm not sure yet, but I think you may have discovered a "limitation" in Nasm. Perhaps a "bug". I don't quite see why Nasm thinks this is a "macro" in the first place!

Can you tell me how you created this table? I ASSume you didn't type all those numbers in by hand - certainly(?) not all on one line, as shown(?). I've tried to create such a table using Nasm's %rep facility, but Nasm is yelling at me. I'm not a sophisticated macro user, and need to refresh my memory on how to do that (not your problem, I'll figure it out - more coffee!). Failing that, I think I can write a small "utility" to spit out such a table. Help me out with exactly what I'm shooting for, if you would...

On or about line 334 in preproc.c, you'll see:

#define DEADMAN_LIMIT (1 << 20)

If you're feeling adventurous, you could try increasing that value, and rebuilding Nasm (make install or I like make install_everything - do .\configure first, if you haven't). You shouldn't need to do this! We'll straighten it out, if that's the problem, and if it is judged to be a "bug", but it may take a while...

This may require more discussion than is appropriate here. Try the Nasm Forum at http://www.nasm.us or you can reach me at fbkotler(pig's tail)myfairpoint(decimal point)net (I don't know why I bother - spammers have found me anyway).

Sorry you're having a problem with this. Thanks for the feedback!

Edit: Update: Well, I managed to create a table. Took a really long time!!! But I did not encounter this error. Can you provide more information about exactly what you did to get this error? (here, or on the Nasm Forum, or by private mail...)

Upvotes: 3

Related Questions