- 138 -
[
[[
[
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”
VP p_blk;
void task()
{
if( get_mpf(ID_mpf ,&p_blk) != E_OK ){
error(“Not enough memory\n”);
}
:
if( pget_mpf(ID_mpf ,&p_blk) != E_OK ){
error(“Not enough memory\n”);
}
:
if( tget_mpf(ID_mpf ,&p_blk, 10) != E_OK ){
error(“Not enough memory\n”);
}
}
<<Example statement in assembly language>>
.include mr100.inc
.GLB task
task: :
PUSH.W R2
get_mpf #ID_MPF1
:
PUSH.W R2
pget_mpf #ID_MPF1
:
PUSH.W R2
PUSHM R6R4
tget_mpf #ID_MPF1,#200
: