Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Assembly (http://www.programmingforums.org/forum20.html)
-   -   dgroup undefined using /coff (http://www.programmingforums.org/showthread.php?t=11106)

Klarre Aug 17th, 2006 3:30 PM

dgroup undefined using /coff
 
I am not sure if I have gotten it correct. But first of all: is dgroup and @data doing the same thing? Second of all: do they keep the adress to the data segment, or what are they?

I have a short piece of code where the first line in the entry function is
:

mov ax, dgroup
This assembles fine when using this command line
:

ml.exe file.asm
But when I try to assemble the file to coff object file format, I got an error that tells me that "dgroup is an undefined symbol".
:

ml.exe /coff file.asm
So my question is: why do I only recieve the error using coff? And is there another way to get the value to my ax register, or alternatively define dgroup?

Thanks for your time!

/Klarre

lostcauz Aug 17th, 2006 5:53 PM

coff doesn't handle 16 bit code, nor do I :)

Edgar Aug 17th, 2006 7:21 PM

Quote:

Originally Posted by Klarre
I am not sure if I have gotten it correct. But first of all: is dgroup and @data doing the same thing? Second of all: do they keep the adress to the data segment, or what are they?

Yes try to use @data, but you have to move @data to ds so the following
segment shoud resolve your problem:

mov ax,@data
mov ds,ax ;because you can't move ax direct to your data segment.

Klarre Aug 18th, 2006 7:53 AM

Quote:

Originally Posted by Edgar
Yes try to use @data, but you have to move @data to ds so the following
segment shoud resolve your problem:

mov ax,@data
mov ds,ax ;because you can't move ax direct to your data segment.

I does'nt matter which one I use either @data nor dgroup. They are both undefined...


All times are GMT -5. The time now is 10:38 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC