Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

OMF records (Developers)

posted by Japheth Homepage, Germany (South), 18.02.2012, 09:05

>
> Please download
> JAPHETH.ZIP.
>
> I automated literally everything, so it should be extremely obvious what to
> do.

Ok, I downloaded it. Additionally, I needed obernm12.zip file and tlink+make from Borland.

After adjusting some paths in RUNME.BAT, the think "runs", but outputs a warning:

warning: no stack defined

and if I start the resulting executable newbef93.exe, it just freezes. This happens with tlink version 2.0 (I don't have v1.01; if I use a newer tlink (v7.1.30) instead, the linker displays "error: Invalid initial stack offset" and no exe is generated). Is this the expected behavior?

>
> [ FreeDOS ] G:\TONY>jwlinkd format dos file
> newbef93,stacks,in,out,term,sys
> JWlink Version 1.9
> Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
> Source code is available under the Sybase Open Watcom Public License.
> loading object files
> Warning! W1032: file newbef93.obj(NEWBEF93), record 25: record (type
> 0x0070) not
> processed
> Warning! W1014: stack segment not found
> Warning! W1023: no starting address found, using 0000:0000
> creating a DOS executable
> [ FreeDOS ] G:\TONY>newbef93 < alphabox.bef
> Run time error code:       4
> compiled with old version of module
> In
> in module In
> [ FreeDOS ] G:\TONY>scrndump c:\tmp\japheth.err
>

>
> At least, to me, this makes absolutely no sense.

Warnings 1014 and 1023 are usually severe, but in this case they probably can be ignored because tlink also warns about the missing stack and tells in the map file that entry point is 0000:0000. Warning W1032 is most likely minor, because the record is just ignored and AFAIU the record isn't needed anyway.

> It is not obvious. Please define "obvious".

With "obvious" I meant "obvious to me AFTER you posted both map files here".

> No, seriously, there's even a
> blank-named empty segment in there for whatever reason. And I still wonder
> if link order matters.

It usually matters. There are linker options (DOSSEG) which tell the linker that segments are to be ordered in a special way, but I guess this doesn't apply here.

I created both map files.

tlink:


 00000H 008C7H 008C8H NEWBEF93           
 008C8H 008C8H 00000H                   
 008D0H 02189H 018BAH DATA               
 02190H 024EAH 0035BH SYS               
 024F0H 0261BH 0012CH IN                 
 02620H 028B2H 00293H TERM               
 028C0H 02977H 000B8H OUT               
 02980H 02AA1H 00122H STACKS             
 02AB0H 12AB0H 10000H STACK             


jwlink:


NEWBEF93            AUTO           0000:0000       000008c8
DATA                AUTO           0000:08d0       000018ba
SYS                 AUTO           0000:2190       0000035b
                    AUTO           024e:000b       00000000
IN                  AUTO           024f:0000       0000012c
TERM                AUTO           024f:0130       00000293
OUT                 AUTO           024f:03d0       000000b8
STACKS              AUTO           024f:0490       00000122
STACK               AUTO           02ab:0000       00010000


The only difference is the location of the unnamed and "empty" segment. However, even an "empty" segment matters: it may define a "label" which is used somewhere inside the binary or it may be used to force a certain alignment (alignment to paragraphs in this case).

However, to make further investigations I first have to know what your program is supposed to do and display.

---
MS-DOS forever!

 

Complete thread:

Back to the forum
Board view  Mix view
22761 Postings in 2121 Threads, 402 registered users (3 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum