Operating System - HP-UX
1848517 Members
3490 Online
104031 Solutions
New Discussion

Required Immediate help in C on HP-UX 11.00

 
SUDHAKARAN.
Occasional Advisor

Required Immediate help in C on HP-UX 11.00

Hi Experts,

I just want to know how we could do 'Inline Assembly' with 'C' on HP-Unix 11.0 where
underlining processor is PA-RISC 2.0. Could you please provide me with a code snippet with 'Inline Assembly'+'C'.

Require Immediate help.

Thanks,
Sudhakaran.
Unix Administrator
2 REPLIES 2
Steve Steel
Honored Contributor

Re: Required Immediate help in C on HP-UX 11.00

Hi


Go to

http://h21007.www2.hp.com/dspp/topic/topic_TopicIndexPage_IDX/1,1712,,00.html

Select the language you require

There you will find documentation links where it is explained well


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Ceesjan van Hattum
Esteemed Contributor

Re: Required Immediate help in C on HP-UX 11.00

Use: asm ("statements");
asm ("nop"); /* do nothing */
asm ("cli"); /* stop interrupts *(/
asm ("sti"); /* enable interrupts */

/* push register onto stack and back */
asm ("pushl %eax\n\t"
"movl $0, %eax\n\t"
"popl %eax");


http://www.c-for-dummies.com/compilers/djgpp_asm.html
You can find some more docu's by search with Google, using keywords "inline assembly"