How to remove warning A4012: line number information for segment without class '

Started by nayankumarp, February 24, 2008, 05:16:25 PM

Previous topic - Next topic

nayankumarp

Hi All,
         I am trying to learn assembly language by using MASM6.11 . i write one simple program with the help of book. but i am getting warning while compiling that program.

the warning is as follows

warning A4012: line number information for segment without class 'CODE ' : code

program is as follows

assume cs:code,ds:data
data   segment
mes1 DB 0DH, 0AH, "amit",0DH, 0AH,"$"
data   ends

code   segment
ORG   100H
start:   mov ax,data
   mov ds,ax
   mov ah,09h   
   mov dx,offset mes1
   int 21h   
   mov ah,4ch
   int 21h
code   ends
   end start


can anybody help me in removing this warning. because of this i am not able to debug the program .

Regards

donkey

"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

nayankumarp

Hi All,
            Thanks for your help.

I am not using visual studio for compiling the program.
i am using pwb for compiling the program in that where and how can i set this compiler option .if u can tell me about how to pass this compiling option from the command prompt then also it will be ok .

If u can tell me the reason why this warning is coming while compiling without wo option i would be very thankful to you.it will help me to understand the way it works.

Regards

MichaelW

Using MASM 6.11, and the 16-bit linker available here renamed to LINK16.EXE to avoid a conflict with the 32-bit linker also named LINK.EXE, and this batch file to assemble and link:

ML /c nayan.asm
pause
LINK16 nayan.obj;
pause


I get this output:

D:\MASM611>ML /c nayan.asm
Microsoft (R) Macro Assembler Version 6.11
Copyright (C) Microsoft Corp 1981-1993.  All rights reserved.

Assembling: nayan.asm

D:\MASM611>pause
Press any key to continue . . .

D:\MASM611>LINK16 nayan.obj;

Microsoft (R) Segmented Executable Linker  Version 5.60.339 Dec  5 1994
Copyright (C) Microsoft Corp 1984-1993.  All rights reserved.

LINK : warning L4021: no stack segment


And an EXE that appears to run OK. The no stack segment is not a problem for something like this, because the program loader will provide a workable stack.

A4012 is listed in the MASM 6.0 Programmer's Guide as:

A4012 multiiple .MODEL directives found: .MODEL ignored

More than one .MODEL directive was found in the current module.
Only the first .MODEL statement is used.


I cannot find a later listing of the ML warnings, but I doubt that this changed between 6.00 and 6.11, so I strongly suspect that the problem is somewhere in the PWB configuration.

eschew obfuscation

nayankumarp

Hi Michael,
               Thanks for your help.Although i did all the setting that i am supposed to do according to the instruction that we get after installing the masm6.11.
If according to you there is anything extra setting that i need to do please tell i am new i jst started learning assembly i might be missing some thing .

If u can tell me how to do pwb setting i will be very thankfull to you.

Regards

MichaelW

Sorry, I no longer have PWB in a workable state. I stopped using it long ago, just a few weeks after I started, and went back to using batch files. If you must use PWB, I suggest that you take a look at your Program list on the Make menu to ensure that you are actually building the source code that you posted. If the problem persists, try examining the Build, MASM, Link, and NMAKE options on the Options menu.
eschew obfuscation