This is a multi-part message in MIME format. ------=_NextPart_000_001C_01C1C8EC.13E31210 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hi,=20 Can anyone explain syscallX() marco (in PowerPC) for me, especially mfcr = instruction. I appreciate if anyone can give me one example (i.e. = coversion from C code to assembly code of one system call): #define _syscall1(type,name,type1,arg1) \ type name(type1 arg1) \ { \ unsigned long __sc_ret, __sc_err; \ { \ register unsigned long __sc_0 __asm__ ("r0"); \ register unsigned long __sc_3 __asm__ ("r3"); \ \ __sc_3 =3D (unsigned long) (arg1); \ __sc_0 =3D __NR_##name; \ __asm__ __volatile__ \ ("sc \n\t" \ "mfcr %1 " \ : "=3D&r" (__sc_3), "=3D&r" (__sc_0) \ : "0" (__sc_3), "1" (__sc_0) \ : __syscall_clobbers); \ __sc_ret =3D __sc_3; \ __sc_err =3D __sc_0; \ } \ __syscall_return (type); \ } Thank you for help in advanced, DANG NGUYEN DUC ------=_NextPart_000_001C_01C1C8EC.13E31210 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Dwindows-1252"> <META content=3D"MSHTML 6.00.2713.1100" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Hi, </FONT></DIV> <DIV><FONT face=3DArial size=3D2>Can anyone explain syscallX() marco (in = PowerPC)=20 for me, especially mfcr instruction. I appreciate if anyone can give me = one=20 example (i.e. coversion from C code to assembly code of one system=20 call):</FONT></DIV> <DIV><FONT face=3DArial size=3D2>#define=20 _syscall1(type,name,type1,arg1) \<BR>type=20 name(type1=20 arg1) \<BR>{ &n= bsp; \<BR> unsigned=20 long __sc_ret,=20 __sc_err; \<BR> { &nbs= p; \<BR> register=20 unsigned long __sc_0 __asm__ = ("r0"); \<BR> register=20 unsigned long __sc_3 __asm__=20 ("r3"); \<BR> &= nbsp;\<BR> __sc_3=20 =3D (unsigned long) (arg1); \<BR> __sc_0 =3D = __NR_##name; \<BR> __asm__=20 __volatile__ \<BR> ("sc&nbs= p; =20 \n\t" \<BR> "mfcr=20 %1 =20 " \<BR> : "=3D&r" (__sc_3), = "=3D&r"=20 (__sc_0) \<BR> : "0" (__sc_3),=20 "1" (__sc_0) \<BR> :=20 __syscall_clobbers); \<BR> __sc_ret = =3D=20 __sc_3; \<BR> __sc_err =3D=20 __sc_0; \<BR> } = \<BR> __syscall_return=20 (type); \<BR>}</FONT></DIV> <DIV><FONT face=3DArial size=3D2>Thank you for help in = advanced,</FONT></DIV> <DIV><FONT face=3DArial size=3D2>DANG NGUYEN = DUC</FONT></DIV></BODY></HTML> ------=_NextPart_000_001C_01C1C8EC.13E31210--