Mail Archives: djgpp/1998/03/10/20:42:41
At 10:25 3/9/1998 -0700, Steve Patton wrote:
>Samir Barjoud wrote in message
><3504abd0 DOT 12351691 AT news DOT miami DOT mindspring DOT com>...
>>>
>>> _asm_("
>>> movsw $0x0003, %ax
>>> int 0x10
>>> "
>Although __dpmi_int is preferrered over inline assembly. I have found that
>calling an int using inline assembly (at least int 0x10) works. That may be
>an exception, since it's a widely known interrupt. Also, you need to have
>__asm__, otherwise you need to do this
>
>#define asm __asm__
>
>to make sure just normal "asm" works.
Untrue. Plain `asm' works, unless you compile with `-ansi' or `-fno-asm'.
The `__asm__' version is intended only for headers to be #included into ANSI
sources. If you intentionally use `__asm__' and compile with `-ansi', you
just fool yourself into thinking you are ANSI compatible.
>
>So for his problem, change it to __asm__, but you really should use dpmi to
>call your ints (just to be safe). And also, he has "movsw", which is also
>incorrect for the assignment he is wanting to make. "movw" is what you
>would want.
That's true. As another point, he needed to write:
int $0x10
with the `$' prefix.
Nate Eldredge
eldredge AT ap DOT net
- Raw text -