Author Topic: What does this ALink warning mean?  (Read 8346 times)

Offline ben321

  • Full Member
  • **
  • Posts: 184
What does this ALink warning mean?
« 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?

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: What does this ALink warning mean?
« Reply #1 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


Offline ben321

  • Full Member
  • **
  • Posts: 184
Re: What does this ALink warning mean?
« Reply #2 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.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: What does this ALink warning mean?
« Reply #3 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