how to define section .stack in OBJ COFF?
I want to compile obj coff file with the help of Open Watcom Linker Version 1.0,
but the linker report error:
Warning! W1014: stack segment not found
What to do?
;============================================
format COFF
section '.code' code
public _start
_start:
jmp _main
db 'WATCOM' ; ????? ?????? ??? DOS/4GW
_main:
sti ; ???? ??????????
cld ; ???? ???????????
; mov ax,0ee02h ; EBX then contains linear address
; int 31h ; of code-segment
; mov ,ebx ; linear address of codeseg
; mov ,ax ; this is an 8kb buffer in low memory
; add esi,80h
; mov ,esi
; mov edi,0a0000h
; sub edi,ebx
; mov ,edi
; mov edi,0b8000h
; sub edi,ebx
; mov ,edi
mov eax,0A0000h
mov , byte 1
;
; Terminate
;
mov ax, 4c00h
int 21h
;=====================================================
lnk file:
op st=8192
form os2 le
file fastc2.obj
name fastc2.exe
op start=_start
op stub=wdosxle.exe
fasm fastc2.asm fastc2.obj
wlink @fastc2.lnk
log file:
flat assembler version 1.45
3 passes, 344 bytes.
Warning! W1014: stack segment not found
I want to compile obj coff file with the help of Open Watcom Linker Version 1.0,
but the linker report error:
Warning! W1014: stack segment not found
What to do?
;============================================
format COFF
section '.code' code
public _start
_start:
jmp _main
db 'WATCOM' ; ????? ?????? ??? DOS/4GW
_main:
sti ; ???? ??????????
cld ; ???? ???????????
; mov ax,0ee02h ; EBX then contains linear address
; int 31h ; of code-segment
; mov ,ebx ; linear address of codeseg
; mov ,ax ; this is an 8kb buffer in low memory
; add esi,80h
; mov ,esi
; mov edi,0a0000h
; sub edi,ebx
; mov ,edi
; mov edi,0b8000h
; sub edi,ebx
; mov ,edi
mov eax,0A0000h
mov , byte 1
;
; Terminate
;
mov ax, 4c00h
int 21h
;=====================================================
lnk file:
op st=8192
form os2 le
file fastc2.obj
name fastc2.exe
op start=_start
op stub=wdosxle.exe
fasm fastc2.asm fastc2.obj
wlink @fastc2.lnk
log file:
flat assembler version 1.45
3 passes, 344 bytes.
Warning! W1014: stack segment not found