NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: ben321 on September 25, 2022, 05:12:19 AM

Title: What does this ALink warning mean?
Post by: ben321 on September 25, 2022, 05:12:19 AM
I built a DOS OBJ file from NASM and am trying to link it into a DOS EXE with ALink. Unfortunately, ALink keeps giving me the warning "Warning - no stack". What does that mean? How do I tell ALink or NASM to make sure that it gives my program a stack?
Title: Re: What does this ALink warning mean?
Post by: Frank Kotler on September 25, 2022, 07:04:50 AM
Been a very long time...
Code: [Select]
section stack stack
; the first "stack" is the name, the second the type? RTFM?
resb 100
; or perhaps
times 100 db 0
; whatever works
? something like that?

best,
Frank

Title: Re: What does this ALink warning mean?
Post by: ben321 on September 26, 2022, 09:09:26 PM
Been a very long time...
Code: [Select]
section stack stack
; the first "stack" is the name, the second the type? RTFM?
resb 100
; or perhaps
times 100 db 0
; whatever works
? something like that?

best,
Frank

Thanks. I didn't know DOS EXEs supported sections like that. I thought that only Windows EXEs supported sections.
Title: Re: What does this ALink warning mean?
Post by: Frank Kotler on September 26, 2022, 10:16:03 PM
Hi ben321,

I think all output formats except "-f bin"  can use sections (segments). The Friendly Manual is not too much help on this question, but does list known section names for each output format.

After thinking about it, I think "dw" would probably be better than "db" for a 16 bit stack, but either should work.

Best,
Frank