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 bencollver Homepage, 01.01.2026, 16:35

Thank you for your helpful replies!


jadoxa:

You are right that it was three addresses. I referred to the wrong map file. See the correct map below [1]. It matches the address in my original post.

I only put the address in bx for the purpose of debugging. I realize that i could use [bx] but i believe this problem affects other parts of the code too, so i would like to find the root cause.


rugxulo:

See wdis output below [2].

Here is the section from the wdis output that corresponds to my original post:

            mov     bx, offset activpg
    0199    BB 06 00                  mov         bx,offset DGROUP:activpg
   
    ;       mov     bx,[bp+16]  ;bl = attribute
            mov     bh,byte ptr [activpg]       ;bh = active display page
    019C    8A 3E 06 00               mov         bh,byte ptr activpg


The original program used A86 and the compact memory model. Mine uses wasm and the large memory model.


Japeth:

I am not sure whether i did this correctly, but i assembled the object with the following command:

    wasm -q -0 -bt=dos -ml -d1 vv.asm

I created calvin.lib using the following commands:

    del calvin.lib
    wlib -q calvin.lib +ex.obj +vu.obj +vl.obj +vs.obj +vm.obj +vc.obj
    wlib -q calvin.lib +va.obj +vk.obj +vv.obj +sys3.obj +compat.obj


And created the executable and map using the following command:

    wcl -q -l=dos -ml -d2 -fe=v.exe -fm=v.map wildargv.obj main.obj calvin.lib


[1] v.map

https://termbin.com/4pl7

[2] wdis -l=vv.lis -s vv.obj

https://termbin.com/j11y

 

Complete thread:

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