Mail Archives: djgpp/1997/10/22/14:39:40
"Kris Heidenstrom" <kheidens AT actrix DOT gen DOT nz> wrote:
> I've just started using DJGPP (GCC 2.7.2.1) and I have some
> thoughts and questions.
>
> If you're not interested in my ramblings, skip to the questions.
>
> First I want to say that I think DJGPP is pretty cool. It is tidy
> and easy to use, and is pretty much a complete development system.
> And it's free! Wow! The only thing missing is the editor, but any
> programmer will have his/her own favourite editor already.
Eli asked it very well, I'll add that: any programmer will have his/her
own favourite editor already ... BUT if other editor behaves like your favorite
and in addition have tons of usefull addtions you'll move to it ;-)
> The system and documentation all has a Unix/C flavour, which is
> alien to me (my background is in PC real-mode assembler), but from
> a simple "I want something that will compile my program" point of
> view, I've had no problems so far.
With RHIDE these alien files will become identical to Borland helps (much more
slow but same look & feel).
> My first test was a small (400 lines) file-sorting program that I
> wrote for Borland C. With very minor editing (removing 'far' and
> 'huge' references),
Did you used:
#define far
#define huge
? I'll recommend it for large sources.
> it compiled and lunk without error, much to my
> amazement! The one bug I introduced was due to my source relying
> on 'char' being unsigned by default, which was definitely my fault.
A very common for BC++ users (I had it some years ago ;-)
> Debugging with gdb was an experience! I'm used to Borland's Turbo
> Debugger and found gdb very awkward by comparison. In fact I found
> it quite painful to use. It has most of the functionality of Turbo
> Debugger (and some nice extra features) and seems to be powerful
> enough, but the user interface is nasty (IMO). At least it's a
> good incentive not to write buggy programs :-)
Eli pointed RHIDE & FSDB, I'll do the same.
> Also I noticed that gdb doesn't allow you to print (or otherwise
> access) word and byte registers - $eax works, $ax, $al and $ah
> don't. It says they are 'void'.
RHIDE have a dissasebler window. IMPORTANT NOTE: RHIDE have gdb inside.
> My final program was 40KB stripped (vs. 16KB for real-mode with
> Borland C) and the execution speed was 2.4 times that of the
> Borland version!
You can compress a DJGPP exe (making it close to 20K) use the mlp... program
found under v2misc of the SimTel distribution.
> So, I want to say "thanks and well done" to DJ Delorie and the
> GNU people (who probably won't be reading this) and everyone else
> who has put so much work into creating and supporting the package.
>
> No doubt I'll have more comments and questions when I've tried more
> challenging stuff.
>
>
> Now for my questions.
>
> djasm - what is it, and where is it documented? It isn't mentioned
> anywhere in the help, or in the (otherwise very helpful) FAQ! Its
> name appears in the exe stub, though :-) Does it use Intel syntax?
> (he asked hopefully :-)
djasm is a tool to allow the creation of the whole DJGPP distribution without
the need of extra tools (like MASM and TASM). Isn't supposed to be used as a
regular tool, but can be. The syntax is close to Intel but isn't Intel. Look
the sources of the stub (in the sources of the libc).
> Intel syntax support - is there a program that converts Intel-syntax
> assembly to AT&T style?
Not usefull, normally you'll need to transalte 16 bits to 32 bits too
(impossible to make it automatically).
> Has anyone tried to write one? Would there
> be any point in me trying to write one?
You can use NASM or JASM to write code in Intel style and link it with DJGPP
(for links go to my Home Page).
> Same questions for Intel-style disassembly for gdb.
Hmmm... you can add it to RHIDE if you want ;-)
> Info reader bug - when I invoke 'info' with a keyword it doesn't know
> about (e.g. 'info djasm'), it reports 'bad command or filename'
> (probably reported by command.com) then hangs. I'm running MS-DOS
> 6.20 and using CWSDPMI 0.90+ (r3) and info 2.16. This seems like a
> bug that would have been picked up by now - maybe there's something
> strange about my setup. Any suggestions?
Use RHIDE to read info files is better for people acustomed to Borland tools.
> CWSDPMI doesn't detect if already installed - if I install CWSDPMI when
> it is already installed, it doesn't detect this, and installs a second
> copy (and a third, etc if I keep installing it). This isn't normally a
> problem but is not good behaviour for a TSR. Maybe it has to work like
> this?
Yes, no, why do you load CWSDPMI by hand? that isn't correct. Load it ones with
the "permanent" switch or never and let the programs to load it automagically.
> Language implementation info - the info file for the standard C library
> is good, but I can't find any language implementation reference - for
> example, something that will tell me what size a 'short' will be, etc.
No body wrote such a text so isn't available.
SET
------------------------------------ 0 --------------------------------
Visit my home page: http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-sot AT usa DOT net - ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013
- Raw text -