Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Watcom ASM + C puzzle, variable has conflicting addresses (Developers)

posted by boeckmann, Aachen, Germany, 01.01.2026, 21:56

> > this is indeed puzzling. Can you upload the .OBJ file? Then I can verify
> > via OMFDUMP if the corresponding fixup in the OBJ is correct.
>
> Here is a .zip archive containing vv.asm and vv.obj:
>
> http://0x0.st/P-wO.zip

I inspected the .OBJ file. The fixups are wrong, as they are segment offsets:

    FIXUP  segment-relative, type 1 (16-bit offset)
          record offset 0094
          frame method F5 (TARGET index)
          target method T4 (SEGDEF) index 0002 '_DATA'


There are two ways to fix this: The MASM way is to ASSUME:

    assume ds:DGROUP,es:DGROUP

Put this in front or right after the start of the _TEXT segment. This should instruct WASM to spit out DGROUP related memory addresses. Be careful not to break other code locations.

You may also explicitly indicate that you are referencing DGROUP:

    mov bh,DGROUP:activpg

 

Complete thread:

Back to the forum
Board view  Mix view
23154 Postings in 2179 Threads, 404 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum