X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: "Rajesh Vivekanandham" <r_vivekan AT satyam DOT net DOT in> To: <djgpp AT delorie DOT com> Subject: COFF and MASM Date: Wed, 13 Mar 2002 21:40:00 +0530 Message-ID: <000601c1caa9$87e88190$f406d6d2@terax> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0007_01C1CAD7.A1A0BD90" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Reply-To: djgpp AT delorie DOT com This is a multi-part message in MIME format. ------=_NextPart_000_0007_01C1CAD7.A1A0BD90 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I am using MASM's COFF object files with Djgpp (RHIDE ) and am getting a strange error while calling the coff file from a c program in the RHIDE env. this is the MASM assembly file .386 .MODEL FLAT .DATA VAR1 DW 0 VAR2 DW 0 .CODE _xmain PROC NEAR MOV AX,0ffffh MOV VAR2,AX MOV VAR1,AX RET _xmain ENDP END now when i use this function from rhide and read the contents of the disassembler window i can see the following code MOV %ax,VAR1 MOV %ax,VAR1 VAR2 store is getting transformed into a VAR1 store!! WHY?????? Please help me out. A BIG LOAD OF THANX in advance. ------=_NextPart_000_0007_01C1CAD7.A1A0BD90 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Dus-ascii"> <TITLE>Message</TITLE> <META content=3D"MSHTML 6.00.2713.1100" name=3DGENERATOR></HEAD> <BODY> <DIV><SPAN class=3D631090016-13032002><FONT face=3DArial size=3D2>I am = using MASM's=20 COFF object files with Djgpp (RHIDE ) and am getting a strange error = while=20 calling the coff file from a c program in the RHIDE = env.</FONT></SPAN></DIV> <DIV><SPAN class=3D631090016-13032002></SPAN><SPAN = class=3D631090016-13032002><FONT=20 face=3DArial size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D631090016-13032002><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D631090016-13032002><FONT face=3DArial size=3D2>this = is the MASM=20 assembly file</FONT></SPAN></DIV> <DIV><SPAN class=3D631090016-13032002><FONT face=3DArial=20 size=3D2>.386</FONT></SPAN></DIV> <DIV><SPAN class=3D631090016-13032002><FONT face=3DArial size=3D2>.MODEL = FLAT</FONT></SPAN></DIV> <DIV><SPAN class=3D631090016-13032002><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D631090016-13032002><FONT face=3DArial = size=3D2>.DATA<BR>VAR1 DW=20 0<BR>VAR2 DW 0</FONT></SPAN></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><SPAN class=3D631090016-13032002><FONT face=3DArial=20 size=3D2>.CODE<BR>_xmain PROC = NEAR</FONT></SPAN></DIV> <DIV><SPAN class=3D631090016-13032002><FONT face=3DArial size=3D2>MOV = AX,0ffffh<BR>MOV=20 VAR2,AX<BR>MOV VAR1,AX<BR>RET<BR>_xmain =20 ENDP<BR>END<BR></DIV></FONT></SPAN> <DIV><SPAN class=3D631090016-13032002><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D631090016-13032002><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D631090016-13032002><FONT face=3DArial size=3D2>now = when i use this=20 function from rhide a</FONT></SPAN><SPAN = class=3D631090016-13032002><FONT=20 face=3DArial size=3D2>nd read the contents of the disassembler=20 window</FONT></SPAN></DIV> <DIV><SPAN class=3D631090016-13032002><FONT face=3DArial size=3D2>i can = see the=20 following code</FONT></SPAN></DIV> <DIV><SPAN class=3D631090016-13032002><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D631090016-13032002><FONT face=3DArial size=3D2>MOV=20 %ax,VAR1</FONT></SPAN></DIV> <DIV><SPAN class=3D631090016-13032002><FONT face=3DArial size=3D2>MOV=20 %ax,VAR1</FONT></SPAN></DIV> <DIV><SPAN class=3D631090016-13032002><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D631090016-13032002><FONT face=3DArial size=3D2>VAR2 = store is=20 getting transformed into a VAR1 store!!</FONT></SPAN></DIV> <DIV><SPAN class=3D631090016-13032002><FONT face=3DArial=20 size=3D2>WHY??????</FONT></SPAN></DIV> <DIV><SPAN class=3D631090016-13032002><FONT face=3DArial size=3D2>Please = help me out.=20 A BIG LOAD OF THANX in advance.</FONT></SPAN><SPAN=20 class=3D631090016-13032002><FONT face=3DArial=20 size=3D2></DIV></FONT></SPAN></BODY></HTML> ------=_NextPart_000_0007_01C1CAD7.A1A0BD90--