NASM - The Netwide Assembler
NASM Forum => Using NASM => Topic started 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?
-
Been a very long time...
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
-
Been a very long time...
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.
-
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