| danielnice 
 28.08.2017, 21:21
   | Debugging HX applications under WD for DOS (Developers) | 
    
     | I want to make protected mode DOS programs using HX DOS Extender in assembler.Before I write anything complicated, I'm trying to get the debugging environment to work (WD.EXE) and I am having problems.
 
 I have set up WATCOM and installed HX DOS Extender per the instructions.
 
 After much experimenting with JWASM, I gave up on it and went with plain WASM.
 All of the examples in HX say to use MASM + LINK but I do not have the latest versions of the Microsoft tools.
 
 So, I used WASM and WLINK and this gave me "source level debugging", but no global or local variables populate the expected windows under WD (for DOS).
 
 Can anyone help me get the local and global variables to show up under WD using the below program as an example?  Further down I give the exact command-line for WASM and WLINK that I used.
 
 Here is the sample program I want to debug:
 ======================
 Contents of SAMPLE.ASM:
 ======================
 .386
 .model flat
 
 .code
 str1 db 13,10,"Hello, world!",13,10,"$"
 
 testproc PROC
 LOCAL test1:WORD
 LOCAL test2:DWORD
 
 Mov test1,1
 Mov test2,2
 
 Ret
 testproc Endp
 
 main proc c
 Call testproc
 
 Mov AH,9
 Mov EDX, offset str1
 Int 21h
 Mov AX,4C00h
 Int 21h
 
 Ret
 main Endp
 End main
 ======================
 ======================
 Here were my exact options:
 ======================
 WASM -D1 -Fo=sample.obj sample.asm
 WLINK @sample.lnk
 
 ======================
 Contents of SAMPLE.LNK:
 ======================
 FILE 'sample.obj'
 NAME 'sample.exe'
 SYSTEM HXNT
 OPTION STACK=16000
 OPTION STUB=loadpe.bin
 RUNTIME CONSOLE
 
 Any help is appreciated.
 -Daniel Nice
 | 
               
     | Rugxulo 
 
  
 Usono,
 29.08.2017, 01:09
 
 @ danielnice
 | Debugging HX applications under WD for DOS | 
    
     | > I want to make protected mode DOS programs using HX DOS Extender in> assembler.
 > Before I write anything complicated, I'm trying to get the debugging
 > environment to work (WD.EXE) and I am having problems.
 
 Okay (although I haven't debugged a lot under WD myself).
 
 > After much experimenting with JWASM, I gave up on it and went with plain
 > WASM.
 
 Why exactly? JWasm is much better.
 
 > All of the examples in HX say to use MASM + LINK but I do not have the
 > latest versions of the Microsoft tools.
 
 You shouldn't need them. JWasm + JWlink were Japheth's preferred tools.
 
 > Can anyone help me get the local and global variables to show up under WD
 > using the below program as an example?  Further down I give the exact
 > command-line for WASM and WLINK that I used.
 >
 > Here were my exact options:
 > ======================
 > WASM -D1 -Fo=sample.obj sample.asm
 > WLINK @sample.lnk
 
 Doesn't WASM go up to -d3 ? Maybe you didn't set it high enough?
 
 AFAIK, default debugging info is Dwarf, but there are other variants available (e.g. older "watcom" or CodeView). Some may work better (or worse) than others. Not sure if they fully work for DOS, though.
 
 BTW, Japheth also modified (fixed) WD.EXE, so you may wish to try that variation as well: japheth-wd.zip
 
 Otherwise, dunno, try asking on news://openwatcom.contributors , they seem minimally active.
 | 
                
     | danielnice 
 29.08.2017, 15:43
 
 @ Rugxulo
 | Debugging HX applications under WD for DOS | 
    
     | > > I want to make protected mode DOS programs using HX DOS Extender in> > assembler.
 > > Before I write anything complicated, I'm trying to get the debugging
 > > environment to work (WD.EXE) and I am having problems.
 >
 > Okay (although I haven't debugged a lot under WD myself).
 >
 > > After much experimenting with JWASM, I gave up on it and went with plain
 > > WASM.
 >
 > Why exactly? JWasm is much better.
 
 If I use JWASM with WLINK, I do still get source level debugging, but it runs the program entirely first.  I then have to select "debug startup" in order to step from the beginning.  I'm not sure how this would be on larger programs.
 
 Using WASM with -D3 gives the same results as -D1.
 
 >
 > > All of the examples in HX say to use MASM + LINK but I do not have the
 > > latest versions of the Microsoft tools.
 >
 > You shouldn't need them.
 > JWasm
 > +
 > JWlink
 > were Japheth's preferred tools.
 >
 JWLINK does not give source level debugging under WD with any options I tried.
 Further, the HX make files all use MS LINK.  In the comments, they say to use WLINK to get source level debugging under WD.
 
 > > Can anyone help me get the local and global variables to show up under
 > WD
 > > using the below program as an example?  Further down I give the exact
 > > command-line for WASM and WLINK that I used.
 > >
 > > Here were my exact options:
 > > ======================
 > > WASM -D1 -Fo=sample.obj sample.asm
 > > WLINK @sample.lnk
 >
 > Doesn't WASM go up to -d3 ? Maybe you didn't set it high enough?
 >
 > AFAIK, default debugging info is Dwarf, but there are other variants
 > available (e.g. older "watcom" or CodeView). Some may work better (or
 > worse) than others. Not sure if they fully work for DOS, though.
 >
 > BTW, Japheth also modified (fixed) WD.EXE, so you may wish to try that
 > variation as well:
 > japheth-wd.zip
 >
 The version of WD from Japheth is not really modified except for a few superficial start up options.  It does contain an interesting example program (DOS2.ASM) explaining how to work around quirks of WD.  Unfortunately, the whole thing assumes 16-bit real-mode and says nothing about what quirks there may be in other situations...
 
 > Otherwise, dunno, try asking on
 > news://openwatcom.contributors
 > , they seem minimally active.
 |