Date: Wed, 6 Mar 1996 02:13:58 -0800 (GMT) From: "Rafael R. Sevilla" To: djgpp AT delorie DOT com Subject: Help with assembler in djgpp Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I'm a new user to djgpp and I've got a question regarding its usage of assembly language. I learned to write 80x86 assembler before I learned C, and switching from the traditional Intel assembler opcodes to the very weird AT&T standard codes that are used by the GNU Assembler that comes with djgpp is rather harsh for me. Also, I've been trying to read such .s files other people have written, and what I'll say is it's not easy for a guy who learned 80x86 assembly right after BASIC. Is there a converter program (in sed or awk) or a shell script in Unix that performs conversion both ways? I've read about the sed script which did that which was posted on the mail archives that converts standard 80x86 code into AT&T format, but I need one that also works in the opposite direction. And also another question. When we write an assembler routine in djgpp that is called by a C function, do the usual BP addressing techniques used in real mode DOS still work the same way? Does it still follow the large- model convention of BP+6 pointing to the first parameter after having pushed the old value of BP? Or must I use EBP to do the same thing, and therefore EBP+10 (the pushed EBP being 32 bits and all, plus the 48-bits of CS:EIP...)? This was one crucial issue which was not addressed by the FAQ at all. I've been writing such low-level interfaces to assembler for years, and I'd like to know how it's done in this new system. ------------------------------------------------------------------------- University of the Philippines Rafael R. Sevilla PABX/OVCA: UP Internet Engineering Project rsevilla AT upd DOT edu DOT ph ------------------------------------------------------------------------- P.S. I've got half the mind to write a version of the djgpp assembler that accepts standard Intel code! Bison should help, as should Flex... RTFM?! RWFM? TINFM!