www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/07/12/22:04:21

Xref: news-dnh.mv.net comp.os.msdos.djgpp:891
Path: news-dnh.mv.net!mv!news.sprintlink.net!howland.reston.ans.net!EU.net!uknet!zippy.dct.ac.uk!dstn02!guest
Newsgroups: comp.os.msdos.djgpp
Subject: inline assembly problem
From: guest AT dstn02 DOT dct DOT ac DOT uk (Guest)
Date: 4 Jul 95 13:10:29 +0100
Sender: guest AT dstn02 (Guest)
Distribution: world
Organization: Dundee Institute of Technology
Nntp-Posting-Host: dstn02.dct.ac.uk
Lines: 42
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

Hi,

I have just installed djgpp with gcc version 2.6.3 with maintenance
releases dj112m1.zip - dj112m4.zip and I am trying to compile C code 
with inline assembly and setting x86 registers but without any sucess.
I have the file below to try and set the AX register (as a simple 
example):

m.c
---
 main() { 
 
   _AX = 0;
 }

using

 c:\source\tests> gcc m.c

but I get the compiler errors:

 m.c: In function 'main':
 m.c:3 '_AX' undeclared <first use this function>
 m.c:3 <Each undeclared identifier is reported only once
 m.c:3 for each function it appears in.>

I have read the faq and some of the doc files (*.inf with info.exe)
and am still none the wiser.  I assume the problem comes down to a
compile option - I have tried a few but I still get the same errors.

I think I have installed correctly since I ran the test batch files 
and apart from the C++ and Objective-C (which I haven't installed) 
examples (oh, and the simple graphics test) they all work.  I have
GAS 2.5.2 installed.

I would be grateful if anyone could clarify this seemingly simple 
problem for me, preferably by email at 

  guest AT dstn02 DOT dct DOT ac DOT uk

Thanks
 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019