Re: Inline assembly under FreeBSD

2008-04-07 Thread Unga
--- Ivan Voras <[EMAIL PROTECTED]> wrote: > Wojciech Puchar wrote: > >> asm("pushfl; stc; int $0x13; setc %%al; > popfl" > >> : "+a" (ax), "+b" (bx), "=c" (cx), "+d" > (dx) > >> : : "esi", "edi"); > >> > >> if ((u8)ax) > >> return -1;/* No extended information

Re: Inline assembly under FreeBSD

2008-04-07 Thread Ivan Voras
Wojciech Puchar wrote: >> asm("pushfl; stc; int $0x13; setc %%al; popfl" >> : "+a" (ax), "+b" (bx), "=c" (cx), "+d" (dx) >> : : "esi", "edi"); >> >> if ((u8)ax) >> return -1;/* No extended information */ >> else >> return 1;/* Extended information

Re: Inline assembly under FreeBSD

2008-04-07 Thread Wojciech Puchar
asm("pushfl; stc; int $0x13; setc %%al; popfl" : "+a" (ax), "+b" (bx), "=c" (cx), "+d" (dx) : : "esi", "edi"); if ((u8)ax) return -1; /* No extended information */ else return 1; /* Extended information ava

Inline assembly under FreeBSD

2008-04-07 Thread Unga
Hi all I'm trying to execute following inline assembly code in a C function under FreeBSD 7.0: typedef unsigned char u8; typedef unsigned short u16; u8 devno= 0x80; static int check_extensions(u8 devno) { u16 ax, bx, cx, dx, di; ax = 0x4100; bx = 0x55AA; dx = de