EasyManua.ls Logo

Intel i960 - Page 250

Intel i960
347 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Language Implementation
7-61
7
Detailed Examples
Example 1: sf1.c (Simple)
The following example refers to the short C program shown in
Example 7-1 below. The asm instruction is shown in bold.
Example 7-1 sf1.c (Simple)
/* Clears interrupt mask in sf1 for i960 CA processor */
void clear_interrupt_mask()
{
asm volatile ("mov 0,sf1");
}
Consider the line containing the asm:
asm volatile ("mov 0,sf1");
"mov 0,sf1" is the
asm-template
. It contains no
substitution-
directives
, and the asm has no
out-list
or
in-list
. It simply
writes a zero into register
sf1. If sf1 contains all zeros, all interrupts
except
nmi are disabled.
Note that this asm can be coded without the input or output operands
because it neither uses nor affects any object or resources that the
compiler knows about.

Table of Contents

Related product manuals