Mail Archives: djgpp-workers/2001/09/02/12:23:41
> From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
> Date: Sun, 2 Sep 2001 10:24:21 -0500 (CDT)
>
> If I build EDEBUG32 with GCC3.01 the ansi detect does not work. Doing
> gcc -O2 -S shows that the asm sections are not included in the output.
> (this is file src/debug/edebug/ed.c). There is probably some new
> asm syntax or attribute that needs to be added?
No, it's the original sin which finally got us; see the patch below.
> If so, this means that all the inline asm could be broken unless reviewed?
No, a simple grep will do ;-) (I am already doing it.)
Thanks for catching this.
Index: src/debug/edebug/ed.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/debug/edebug/ed.c,v
retrieving revision 1.3
diff -u -p -r1.3 ed.c
--- src/debug/edebug/ed.c 2001/05/11 17:52:27 1.3
+++ src/debug/edebug/ed.c 2001/09/02 16:20:03
@@ -27,12 +27,14 @@ void ansi(int fg)
void ansidetect(void) /* Idea from DJ's install program */
{
word16 oldp, newp;
- asm("movb $3,%%ah;movb $0,%%bh;int $0x10;movw %%dx,%0" : "=g" (oldp) :
- : "ax", "bx", "cx", "dx");
+ __asm__ __volatile__ ("movb $3,%%ah;movb $0,%%bh;int $0x10;movw %%dx,%0"
+ : "=g" (oldp) :
+ : "ax", "bx", "cx", "dx");
printf("\033[0m");
fflush(stdout);
- asm("movb $3,%%ah;movb $0,%%bh;int $0x10;movw %%dx,%0" : "=g" (newp) :
- : "ax", "bx", "cx", "dx");
+ __asm__ __volatile__ ("movb $3,%%ah;movb $0,%%bh;int $0x10;movw %%dx,%0"
+ : "=g" (newp) :
+ : "ax", "bx", "cx", "dx");
if (newp == oldp)
ansi_mode = 1;
else {
- Raw text -