WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
Pages (2) [1] 2   ( Go to first unread post )

MASM error A2006 and warning A4023, error A2006: undefined symbol : DGROUP & warning A4023: with /coff switch, leading underscore required for start address...

a112524a
Quote Post


New Member
*

Group: Members
Posts: 1
Member No.: 2487
Joined: 9-May 06


Anyone can help me ?

I am trying to compile DOS program (a sample prog) in WinAsm ,
compiler version : MASM32 v9
code as bellow :

CODE
.MODEL small
.stack 100h

.data
msg db "This is a 16-bit DOS .EXE executable",13,10,"Hello, World!",13,10,"$"

.code
start:
mov ax,@data
mov ds,ax
   
mov dx,offset msg
mov ah,9  
int 21h  

mov ax,0C07h
int 21h  

mov ax, 4C00h  
int 21h    
end start


i always get error message as below (copy from WinAsm Output window):

CODE
D:\masm32\bin\ML /c /I"D:\Masm32\Include" "G:\work.test\WinAsm\DOS\DosExe.asm"

Microsoft ® Macro Assembler Version 6.14.8444
Copyright © Microsoft Corp 1981-1997.  All rights reserved.

Assembling: G:\work.test\WinAsm\DOS\DosExe.asm
G:\work.test\WinAsm\DOS\DosExe.asm(16) : error A2006: undefined symbol : DGROUP
G:\work.test\WinAsm\DOS\DosExe.asm(28) : warning A4023: with /coff switch, leading underscore required for start address : start

Make finished. 2 error(s) occured.



but , when i compile in command mode , it is correctly and run perfect.
my pc is Win XP Prof.

i am so confused what is wrong in WinAsm???

command mode compile method as bellow :

ml /c dosexe.asm
link16 dosexe;

???

Alex

Sponsored Links
PMEmail Poster
Top
shoorick
Quote Post


Extremely Active Member
******

Group: Admins
Posts: 2310
Member No.: 160
Joined: 22-June 04


hi! i had not masm32 v9 installed yet, and project compiled well from IDE at my PC.
I could guess there maybe file situated in masm32 include dir, with default switches for ml, forced 32-bit mode to the compiler.
try to look for it and remove (or hide) if found.
PMEmail PosterUsers Website
Top
icehole
Quote Post


Extremely Active Member
******

Group: Members
Posts: 168
Member No.: 1938
Joined: 12-January 06


Hi,

Project compiles and executes with WinAsm under ver 9 MASM32 just fine.

I believe this is where your problem comes from :

When you started a new project you selected a project type of Console Application instead of type DOS Program. A 16-bit DOS program only needs a /c switch sent to ML through make. A console application sets up quite a few switches that will not allow a basic DOS program to compile in small mode. Use the Console Application type project when you want to run 32-bit flat model programs in a DOS-like window and the DOS Program type project for 16-bit DOS programs.

When you compiled at the command line you gave ML the switches it needed to handle your source. The small model set up segments that a console application can't handle (DGROUP error). The other error is caused by Pascal vs C conventions where a leading underscore is used for labels.

By the way, the switches used for the various project types can be viewed and modified through the 'Project - Properties' menu selection.

Hope this helps.
PMEmail Poster
Top
shoorick
Quote Post


Extremely Active Member
******

Group: Admins
Posts: 2310
Member No.: 160
Joined: 22-June 04


try to do this in commandline as experiment:

ml /c /I"D:\Masm32\Include" dosexe.asm
link16 dosexe

if it will fail then i'm sure there could be something like *.cfg file with default ml switches, forcing it to 32-bit mode
PMEmail PosterUsers Website
Top
icehole
Quote Post


Extremely Active Member
******

Group: Members
Posts: 168
Member No.: 1938
Joined: 12-January 06


This doesn't appear to have anything to do with ver9 MASM32.

This can be reproduced with either ver8.2 or ver9.
Starting a new project as a Console Application with either version of MASM32 will produce the same errors as above. Starting a new project as a DOS Program with either version will compile and execute just fine.
The only difference is the way ML is told to assemble from WinAsm.
PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Pages (2) [1] 2  Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google