From: Alexei A. F. <ale...@ma...> - 2004-04-25 21:41:08
|
I use the following with NASM and TLINK and it works just fine (checked in the debugger): ------8<------ GLOBAL __terminate, _abort EXTERN _main SEGMENT _TEXT PUBLIC CLASS=CODE USE16 ..start: mov ax, _DATA mov ds, ax mov es, ax call _main __terminate: _abort: mov ax, 4c00h int 21h SEGMENT _DATA PUBLIC CLASS=DATA SEGMENT _BSS PUBLIC CLASS=DATA SEGMENT _STACK STACK CLASS=STACK resb 128 ------8<------ The stack pointer gets properly initialized by DOS from the info of the EXE file header. AFAIR, segment name and class (_STACK and CLASS=STACK) don't matter. What matters is the STACK keyword between these two. Alex ----- Original Message ----- From: "Stanislav Karchebny" <be...@up...> To: <nas...@li...> Sent: Monday, April 26, 2004 12:17 AM Subject: [Nasm-devel] Fwd: NASM no stack error > > > ---------- Forwarded Message ---------- > > Subject: NASM no stack error > Date: Monday 26 April 2004 02:09 > From: "Zack Smith" <zt...@my...> > To: be...@us... > > Hi, > > I have a problem and I can't find the resolution > > to it in the user manual. Can you assist? > > > > I'm trying to assemble and link and EXE, and > > the stack segment I'm including is not recognized > > or used by either TLINK or ALINK, even though > > both show it in their map files. I am using this: > > > > SEGMENT STACK CLASS=STACK > > resb 512 > > stacktop: > > > > I've tried making it 'common', adding stacks to > > my other asm files etc. Nothing works. > > > > Is this a common problem with a common solution? > > > > Thanks for any help. > > ________________ > > Zack Smith > > zt...@my... |