Mail Archives: djgpp/2001/02/18/13:57:33
Sopola wrote:
>
> Hello Group,
> I hope you can help me. I have a question about inline assembly. I
> usually use VC++, where you use it like this:
> __asm {
> /* your code here*/
> }
> but I need it compiled under DJGPP.
>
> When I do this
>
> __asm {
> mov ah, 00h
> mov al, 02h
> int 10h
> }
>
> I get "parse error before {" and "nondigits in number and not
> hexadecimal".
> If I do it like this:
> __asm ("mov ah, 00h");
> __asm ("mov al, 02h");
> __asm ("int 10h");
>
> I get "error: too many memory references for mov".
> Can someone help me? How do I use inline assembly? What I need is real
> simple, a couple of instructions at most.
> Thanks a lot,
> George
DJGPP doesn't support intel assembler syntax. You will need to use AT&T
Syntax.
There are a couple of good tutorials online which can teach you that.
Besides: You really shouldn't use assembler to call interrupts that way
in DJGPP. Use the builtin functions instead.
I hope this is useful
Silver
- Raw text -