Assembling/Linking and CodeView Debugger 
Author Message
 Assembling/Linking and CodeView Debugger

I am using ml.exe, version 6.15.8803, and link.exe, version 5.60.339.
First, when I assemble a program I am
UNable to get a list file even though I am using the /Fl switch.  My command
to assemble is as follows:

         C:\TAE\WRKSAMP>ML HELLO1.ASM /W2 /WX /Sa /Sg /Sc /Zi /Fl /c

The file assembles without error.  Then I link as follows:

         C:\TAE\WRKSAMP>LINK HELLO1 /CO

The file links w/o error.  I carriage return the four prompts for:      Run
File [hello1.exe]

List File  [nul.map]

Libraries [.lib]

Definitions File [nul.def]

However, when I then type:

       C:\TAE\WRKSAMP>C:\MASM611\BIN\CV HELLO1.EXE

Code View activates, but the Code View Source Window contains source with NO
line numbers, NO comments,
and NO assembler directives.

Can anyone tell me why I 1) can't get a listing file; 2) can't get other
than plain code in the CodeView Window?

Here is the source for the file I am assembling:

;
; Program Hello1 ( Chapter 8 Page 2 )
;
                 TITLE Hello1 Example Program 1 ; title is not necessary
OurCode SEGMENT PARA  PUBLIC  'CODE'  ; declare code segment
                 ASSUME CS:OurCode, DS:OurData, SS:OurStack
Start:         MOV AX,OurData  ; copy address of data
                 MOV DS,AX   ; segment into DS
                 LEA DX,Hello  ; address of message
                 MOV AH,09h   ; DOS service "output text string"
                 INT 21h   ; DOS service call
                 MOV AH,4Ch   ; DOS service "terminate process"
                 MOV AL,00h   ; return code zero
                 INT 21h   ; DOS service call
OurCode ENDS    ; end of code segment

OurData     SEGMENT PARA PUBLIC 'DATA' ; declare data segment
Hello            DB 'Hello!$'  ; define string to display
OurData     ENDS    ; end of data segment

OurStack                     SEGMENT PARA STACK 'STACK' ; declare stack
segment
                 DB 64 DUP (?)   ; reserve 64 bytes
OurStack ENDS   ; end of stack segment

                 END Start  ; end of program

Thanks to any kind soul who can help me.  I am just beginning to try to
teach myself
assembly language.

Regards,
Jeff Stephens



Wed, 16 Jul 2003 03:10:30 GMT  
 Assembling/Linking and CodeView Debugger

Quote:
>  C:\TAE\WRKSAMP>ML HELLO1.ASM /W2 /WX /Sa /Sg /Sc /Zi /Fl /c

Change it around so it works this way (so the command line flags
appear before the source code):
ML /W2 /WX /Sa /Sg /Sc /Zi /Fl /c HELLO1.ASM

Quote:
>  C:\TAE\WRKSAMP>LINK HELLO1 /CO

Same here:
LINK /CO HELLO1

- Rick C. Hodgin



Wed, 16 Jul 2003 21:27:01 GMT  
 Assembling/Linking and CodeView Debugger
Don;t know what ML is, I have an authorised copy of MASM together with
LINK. I have a couple of .BAT files which fix everything up. Been
using these for years NO PROBLEMS. Write and debug lots of .ASM
subroutines and a few .ASM mainlines. If the .BAT files would be of
use send me a direct email and I will let you have copies. Maybe they
will remove your problems and slick up your operations.

 On Fri, 26 Jan 2001 19:10:30 GMT, "Jeff Stephens"

Quote:

>I am using ml.exe, version 6.15.8803, and link.exe, version 5.60.339.
>First, when I assemble a program I am
>UNable to get a list file even though I am using the /Fl switch.  My command
>to assemble is as follows:

>         C:\TAE\WRKSAMP>ML HELLO1.ASM /W2 /WX /Sa /Sg /Sc /Zi /Fl /c

>The file assembles without error.  Then I link as follows:

>         C:\TAE\WRKSAMP>LINK HELLO1 /CO

>The file links w/o error.  I carriage return the four prompts for:      Run
>File [hello1.exe]

>List File  [nul.map]

>Libraries [.lib]

>Definitions File [nul.def]

>However, when I then type:

>       C:\TAE\WRKSAMP>C:\MASM611\BIN\CV HELLO1.EXE

>Code View activates, but the Code View Source Window contains source with NO
>line numbers, NO comments,
>and NO assembler directives.

>Can anyone tell me why I 1) can't get a listing file; 2) can't get other
>than plain code in the CodeView Window?

>Here is the source for the file I am assembling:

>;
>; Program Hello1 ( Chapter 8 Page 2 )
>;
>                 TITLE Hello1 Example Program 1 ; title is not necessary
>OurCode SEGMENT PARA  PUBLIC  'CODE'  ; declare code segment
>                 ASSUME CS:OurCode, DS:OurData, SS:OurStack
>Start:         MOV AX,OurData  ; copy address of data
>                 MOV DS,AX   ; segment into DS
>                 LEA DX,Hello  ; address of message
>                 MOV AH,09h   ; DOS service "output text string"
>                 INT 21h   ; DOS service call
>                 MOV AH,4Ch   ; DOS service "terminate process"
>                 MOV AL,00h   ; return code zero
>                 INT 21h   ; DOS service call
>OurCode ENDS    ; end of code segment

>OurData     SEGMENT PARA PUBLIC 'DATA' ; declare data segment
>Hello            DB 'Hello!$'  ; define string to display
>OurData     ENDS    ; end of data segment

>OurStack                     SEGMENT PARA STACK 'STACK' ; declare stack
>segment
>                 DB 64 DUP (?)   ; reserve 64 bytes
>OurStack ENDS   ; end of stack segment

>                 END Start  ; end of program

>Thanks to any kind soul who can help me.  I am just beginning to try to
>teach myself
>assembly language.

>Regards,
>Jeff Stephens




Thu, 17 Jul 2003 05:53:15 GMT  
 Assembling/Linking and CodeView Debugger
Thanks.  This did the trick as far as generating the .LST file.  Now if I
can solve my problem with the Code
View de{*filter*} I'll be in business.



Quote:
> >  C:\TAE\WRKSAMP>ML HELLO1.ASM /W2 /WX /Sa /Sg /Sc /Zi /Fl /c

> Change it around so it works this way (so the command line flags
> appear before the source code):
> ML /W2 /WX /Sa /Sg /Sc /Zi /Fl /c HELLO1.ASM

> >  C:\TAE\WRKSAMP>LINK HELLO1 /CO

> Same here:
> LINK /CO HELLO1

> - Rick C. Hodgin



Thu, 17 Jul 2003 11:55:38 GMT  
 Assembling/Linking and CodeView Debugger

Quote:

> Don;t know what ML is

ML.EXE is actually MASM "proper"...the assembler itself...you can type
"MASM", though, and this runs ML.EXE and possibly LINK.EXE on your behalf,
batch file-style...either way _should_ work as long as you get the command
tail right...

Beth :)



Thu, 17 Jul 2003 12:45:43 GMT  
 Assembling/Linking and CodeView Debugger

Quote:
>Now if I can solve my problem with the Code
>View de{*filter*} I'll be in business.

I haven't been able to check usenet over the weekend.  If you still
need help let me know and I'll do my best.

- Rick C. Hodgin



Fri, 18 Jul 2003 21:44:23 GMT  
 Assembling/Linking and CodeView Debugger
Hello Beth,

Never had to bother with the details. I just use the .BAT files for
assembly and assembly with symbols for Codeview and it all works just
fine. If it is not broken don't fix it, is what I'm told.
   Had lots of fun writing assembly stuff, but not as nice as PDP-10
code back in the old days. That was REAL fun, using TECO to edit it
and debugging it with DDT was pure joy.



Quote:

>> Don;t know what ML is

>ML.EXE is actually MASM "proper"...the assembler itself...you can type
>"MASM", though, and this runs ML.EXE and possibly LINK.EXE on your behalf,
>batch file-style...either way _should_ work as long as you get the command
>tail right...

>Beth :)




Sat, 19 Jul 2003 06:38:00 GMT  
 Assembling/Linking and CodeView Debugger
Problem solved!!!!!!!  I was using the wrong version of the linker. Only
version 5.31.009 which comes with
the MASM 6.11 distribution links correctly and creates a file that then
shows the line #'s, comments, assembler
directives, etc. in the codeview window.  I currently have 3 versions of the
linker on my machine.  Version 5.31.009
at 199KB, version 5.60.339 at 356KB, and version 5.12.8078 at 453KB. Only
the original links segmented code
correctly for use with codeview, although the rest will produce an
executable OK.



Quote:
> >Now if I can solve my problem with the Code
> >View de{*filter*} I'll be in business.

> I haven't been able to check usenet over the weekend.  If you still
> need help let me know and I'll do my best.

> - Rick C. Hodgin



Sat, 19 Jul 2003 07:50:11 GMT  
 Assembling/Linking and CodeView Debugger
On Mon, 29 Jan 2001 23:50:11 GMT, "Jeff Stephens"

Quote:

>Problem solved!!!!!!!  I was using the wrong version of the linker. Only
>version 5.31.009 which comes with
>the MASM 6.11 distribution links correctly and creates a file that then
>shows the line #'s, comments, assembler
>directives, etc. in the codeview window.  I currently have 3 versions of the
>linker on my machine.  Version 5.31.009
>at 199KB, version 5.60.339 at 356KB, and version 5.12.8078 at 453KB. Only
>the original links segmented code
>correctly for use with codeview, although the rest will produce an
>executable OK.

If you look at the last 4 or 8 bytes of the EXE's you should find a
sequence something like "NB0n" where n can be 2-9.  This is the
CodeView format version.  Different versions of CodeView require
different versions of the CodeView data format.

--
Arargh (at enteract dot com)    http://www.arargh.com



Sat, 19 Jul 2003 10:19:04 GMT  
 Assembling/Linking and CodeView Debugger

Quote:

> Never had to bother with the details. I just use the .BAT files for
> assembly and assembly with symbols for Codeview and it all works just
> fine. If it is not broken don't fix it, is what I'm told.

Yeah...as I said, either way works as long as you use the commands
correctly...it's entirely a personal taste thing because all the MASM
"command" does is pass on the arguments to ML.EXE and LINK.EXE...if,
instead, you want to do that yourself, you can...it makes no real difference
because you have to do things in the same order whatever (e.g. you can't
link before you compile)...it's purely subjective personal taste, as far as
I can see...

*lecture mode on*

[ In regards the statement: "If it is not broken don't fix it" ]

Ummm...although, who said anything was "broken"? Has your copy of MASM
accidentally overwritten parts of itself?? Has "wear and tear" disintegrated
the MZ header??

Sorry, sorry...but I hear people so often abuse the statement "if it's not
broken, then don't try to fix it" to justify their actions/disagreement, I
can't let any abuse of the saying pass unpunished, however innocently or
maliciously it's being used (in your case, it's just an innocent
"throw-away" remark so this is more aimed at other people than you
specifically, Rolie...just your statement has reminded me how really, really
annoyed I get at that sort of "language abuse"...lol...nothing personal ;)

By the definition of the words, you cannot "fix" what isn't
"broken"...that's why that saying is always a winner...it's guaranteed
correct by definition..._BUT_ who's "fixing" anything? What's "broken"? This
is where this very common abuse comes into play...

"Fix" and "improve" are NOT synonyms..."broken" and "crap" are also not
synonyms...they have completely different semantics (they have similarities,
yes, but they are _NOT_ equivalent)...but it's all too common when someone
suggests an alternative solution, which they believe is an _improvement_ of
a _crap_ system, that people counter with "If it ain't broken, don't fix
it"...ummm, yes, in totally agreement with that statement..._but_ nothing's
"broken" and I ain't "fixing" anything...as they say in a court of law,
"Objection! Relevancy!" ;)

As I say, this is nothing personal, Rolie...it's something _everyone_ seems
to do...but, to put it bluntly, _I LOATHE IT_ (being the heretic I am, I
often get countered with such a _false_ argument to shut me up ;) so please
appreciate that I had to jump on my soapbox there for two seconds...lol ;)

*lecture mode off*

Quote:
>    Had lots of fun writing assembly stuff, but not as nice as PDP-10
> code back in the old days. That was REAL fun, using TECO to edit it
> and debugging it with DDT was pure joy.

Aaaah...you can't beat a good round of nostalgia...*drifts off into innocent
childhood memories* lol ;)

"DDT"?? Woah! Now that _is_ a kuhl name for a de{*filter*}...

Hmm, do you think anyone would notice if I stole that name? Naaah...scrub
that idea...it'd never work...just thinking aloud...lol ;)

Although, nostalgia can often could one's judgement...a friend of mine had
kept his C64 in his garage and my memory flooded with all these joyous
memories of the old "elephant memory" (remember those ads?? lol ;)...but
when it actually came back on, I realised that my memories had been a little
coloured by all that nostalgia...

Oh yeah, it was _still_ a fun system...but not half as fun as I remember it
being...

Ah well...

*wonders if she'll end up looking back on the x86 in the same way* (Uh oh!!
;)

Beth :)

*giggles to herself that a machine who's entire memory was roughly the same
size as the video memory of mode 13h (i.e. 64k) was ever considered to be
"elephant"-sized memory (an elephant never forgets, as the ads implied :)*

P.S. Actually, it really is a testiment to the skills that were around then,
isn't it? Looking at the gargantuan sizes of things these days and
remembering what complex masterworks the could code in such a small
space...a .tiny model program (actually, less than that, the BASIC
interpreter took up a few precious K)....

Oh...look what you done now, Rolie...you got me all nostalgic over a lump of
plastic and silicon (and I'm not talking about Pammy Anderson
there)...*laugh* ;)

Quote:


> >> Don;t know what ML is

> >ML.EXE is actually MASM "proper"...the assembler itself...you can type
> >"MASM", though, and this runs ML.EXE and possibly LINK.EXE on your
behalf,
> >batch file-style...either way _should_ work as long as you get the
command
> >tail right...



Sat, 19 Jul 2003 11:01:34 GMT  
 Assembling/Linking and CodeView Debugger


   > [...major snip...]
   >
   >*wonders if she'll end up looking back on the x86 in the same way*
   >(Uh oh!! ;)
   >Beth :)

Cor!  Beth, you ARE one loquacious Pommy bird! ;)



Sun, 20 Jul 2003 12:33:16 GMT  
 Assembling/Linking and CodeView Debugger
GEEZ Beth,

You certainly got wound up!!!!!!!
Neil Franklin is trying to make a PDP-10 on one or more FPGA chips I
hope he is successful, There is a big interest in PDP-10s, for more
info see the NG. I was a Hon systems programmer for it's predecessor
the PDP-6 at the University of West Australia. Still have most of the
sources for the time sharing OS especially the ones I modified.

Regards,



Quote:

>> Never had to bother with the details. I just use the .BAT files for
>> assembly and assembly with symbols for Codeview and it all works just
>> fine. If it is not broken don't fix it, is what I'm told.

>Yeah...as I said, either way works as long as you use the commands
>correctly...it's entirely a personal taste thing because all the MASM
>"command" does is pass on the arguments to ML.EXE and LINK.EXE...if,
>instead, you want to do that yourself, you can...it makes no real difference
>because you have to do things in the same order whatever (e.g. you can't
>link before you compile)...it's purely subjective personal taste, as far as
>I can see...

>*lecture mode on*

>[ In regards the statement: "If it is not broken don't fix it" ]

>Ummm...although, who said anything was "broken"? Has your copy of MASM
>accidentally overwritten parts of itself?? Has "wear and tear" disintegrated
>the MZ header??

>Sorry, sorry...but I hear people so often abuse the statement "if it's not
>broken, then don't try to fix it" to justify their actions/disagreement, I
>can't let any abuse of the saying pass unpunished, however innocently or
>maliciously it's being used (in your case, it's just an innocent
>"throw-away" remark so this is more aimed at other people than you
>specifically, Rolie...just your statement has reminded me how really, really
>annoyed I get at that sort of "language abuse"...lol...nothing personal ;)

>By the definition of the words, you cannot "fix" what isn't
>"broken"...that's why that saying is always a winner...it's guaranteed
>correct by definition..._BUT_ who's "fixing" anything? What's "broken"? This
>is where this very common abuse comes into play...

>"Fix" and "improve" are NOT synonyms..."broken" and "crap" are also not
>synonyms...they have completely different semantics (they have similarities,
>yes, but they are _NOT_ equivalent)...but it's all too common when someone
>suggests an alternative solution, which they believe is an _improvement_ of
>a _crap_ system, that people counter with "If it ain't broken, don't fix
>it"...ummm, yes, in totally agreement with that statement..._but_ nothing's
>"broken" and I ain't "fixing" anything...as they say in a court of law,
>"Objection! Relevancy!" ;)

>As I say, this is nothing personal, Rolie...it's something _everyone_ seems
>to do...but, to put it bluntly, _I LOATHE IT_ (being the heretic I am, I
>often get countered with such a _false_ argument to shut me up ;) so please
>appreciate that I had to jump on my soapbox there for two seconds...lol ;)

>*lecture mode off*

>>    Had lots of fun writing assembly stuff, but not as nice as PDP-10
>> code back in the old days. That was REAL fun, using TECO to edit it
>> and debugging it with DDT was pure joy.

>Aaaah...you can't beat a good round of nostalgia...*drifts off into innocent
>childhood memories* lol ;)

>"DDT"?? Woah! Now that _is_ a kuhl name for a de{*filter*}...

>Hmm, do you think anyone would notice if I stole that name? Naaah...scrub
>that idea...it'd never work...just thinking aloud...lol ;)

>Although, nostalgia can often could one's judgement...a friend of mine had
>kept his C64 in his garage and my memory flooded with all these joyous
>memories of the old "elephant memory" (remember those ads?? lol ;)...but
>when it actually came back on, I realised that my memories had been a little
>coloured by all that nostalgia...

>Oh yeah, it was _still_ a fun system...but not half as fun as I remember it
>being...

>Ah well...

>*wonders if she'll end up looking back on the x86 in the same way* (Uh oh!!
>;)

>Beth :)

>*giggles to herself that a machine who's entire memory was roughly the same
>size as the video memory of mode 13h (i.e. 64k) was ever considered to be
>"elephant"-sized memory (an elephant never forgets, as the ads implied :)*

>P.S. Actually, it really is a testiment to the skills that were around then,
>isn't it? Looking at the gargantuan sizes of things these days and
>remembering what complex masterworks the could code in such a small
>space...a .tiny model program (actually, less than that, the BASIC
>interpreter took up a few precious K)....

>Oh...look what you done now, Rolie...you got me all nostalgic over a lump of
>plastic and silicon (and I'm not talking about Pammy Anderson
>there)...*laugh* ;)



>> >> Don;t know what ML is

>> >ML.EXE is actually MASM "proper"...the assembler itself...you can type
>> >"MASM", though, and this runs ML.EXE and possibly LINK.EXE on your
>behalf,
>> >batch file-style...either way _should_ work as long as you get the
>command
>> >tail right...




Mon, 21 Jul 2003 06:19:34 GMT  
 Assembling/Linking and CodeView Debugger
Hello A.N Hony-Mouse,

How did you know she was a pommy bird?
The word "LOQUACIOUS" is a beauty what the hell does it mean?

Quote:


>   > [...major snip...]

>   >*wonders if she'll end up looking back on the x86 in the same way*
>   >(Uh oh!! ;)
>   >Beth :)

>Cor!  Beth, you ARE one loquacious Pommy bird! ;)




Mon, 21 Jul 2003 06:23:53 GMT  
 Assembling/Linking and CodeView Debugger

Quote:

> How did you know she was a pommy bird?

A very good question, Rolie...obviously, you get a hint at that fact because
I use British spellings (colour as opposed to color ;)...but then so do
other countries...Oz for one, come to think of it...

My turn of phrase, perhaps? I do often use a British-esque way of saying
things...such as "not my cup of tea"...etc...but, again, this is not
concrete proof just a hint in that direction...

*thinking*

No wait...I remember...there was a post in regards the distance between
California and the UK to do with the speeds of server connections...and I
mentioned that, obviously, its the same problem from UK back to California,
being the same distance...so that's where I mentioned my origins...mystery
solved ;)

Beth :)



Mon, 21 Jul 2003 11:18:47 GMT  
 Assembling/Linking and CodeView Debugger

Quote:

> GEEZ Beth,

> You certainly got wound up!!!!!!!

Yeah...as I said, it was nothing personal and nothing in your post that
directly triggered my soapbox outing (except that you mention _that_ saying
;)...it's just I've so commonly heard that phrase abused that I just had to
get on my high horse and rant...appologies...but if one person doesn't use
it in an abusive manner again, then my work here is done...hehehehe ;)

Am I forgiven? lol ;)

Beth :)



Mon, 21 Jul 2003 11:22:27 GMT  
 
 [ 16 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Assembling/Linking and CodeView Debugger Use

2. codeview debugger

3. I need a debugger like CodeView.

4. CodeView Debugger for MS-DOS or Windows

5. Codeview debugger on MASM6.11 Problem.

6. USe of Codeview debugger

7. Assembling/Linking 16 vs. 32 bit code

8. link MASM assembled obj files with BCC55 ones using borland ilink32

9. Batch file to assemble and link

10. How to Assemble+Link Compiler Output ?

11. Problems assembling and linking

12. Linking the Clipper Debugger into an application.

 

 
Powered by phpBB® Forum Software