- 140 -
[
[[
[
E
Ex
xa
am
mp
pl
le
e
p
pr
ro
og
gr
ra
am
m
s
st
ta
at
te
em
me
en
nt
t
]
]]
]
<<Example statement in C language>>
#include <itron.h>
#include <kernel.h>
#include “kernel_id.h”
void task()
{ VP p_blf;
if( get_mpf(ID_mpf1,&p_blf) != E_OK )
error(“Not enough memory \n”);
:
rel_mpf(ID_mpf1,p_blf);
}
<<Example statement in assembly language>>
.include mr100.inc
.GLB task
_g_blk: .blkb 4
task: :
PUSH.W R2
get_mpf #ID_MPF1
:
MOV.L R3R1,_g_blk
PUSH.W R2
rel_mpf #ID_MPF1,_g_blk
: