- 147 -
[
[
[
[
E
E
x
x
a
a
m
m
p
p
l
l
e
e
p
p
r
r
o
o
g
g
r
r
a
a
m
m
s
s
t
t
a
a
t
t
e
e
m
m
e
e
n
n
t
t
]
]
]
]
<<Example statement in C language>>
#include <itron.h>
#include <kernel.h>
#include “kernel_id.h”
void task()
{
VP p_blk;
if( get_mpl(ID_mpl1, 200, &p_blk) != E_OK )
error(“Not enough memory \n”);
:
rel_mpl(ID_mp1,p_blk);
}
<<Example statement in assembly language>>
.include
mr100.inc
.GLB
task
_g_blk: .blkb 4
task:
:
PUSH.W
R2
pget_mpl #ID_MPL1,#200
:
MOV.L
R3R1,_g_blk
PUSH.W
R2
rel_mpl #ID_MPL1,_g_blk
: