
5. TUTORIAL
B–61863E–1/06
GENERAL
34
d. Investigation of the cause for the system error.
Investigation of the pointer operation especially, because the
exceptional process code of the system alarm message is 13.
The part of the pointer operation is “*pl_memul2(D,
ALL_TIME)” at line 70 and 71 of the source. In case the offset
address for the argument of the function pl_memul2() is specified
out of range, the return value becomes NULL. Because of this,
the argument of the function needs to be confirmed.
NOTE
When referring to the contents of a NULL pointer,
exceptional process code is made.
The value of “D” and “ALL_TIME” is defined in tutorial.h.
D defined as 9 is not a mistake, but the definition of ALL_TIME
10000 is wrong.
The D address area for PMC–SA1/SA5 ranges from 0-1859, for
PMC–SB5/SC/SC3/NB ranges from 0-2999, and for
PMC–SC4/NB2/NB6 ranges 0-7999. Because the specified
address it out of range, the return value of the function
pl_memul2() is expected to become NULL.
CAUTION
It can not be said that the source code causes the system
alarm.
Investigate around the source code or the routine calling the
source code.
(7) Source modification
Replace the line,
#define ALL_TIME 10000
with
#define ALL_TIME 4
in tutorial.h
(8) Execution
Execute as described in (3) and (4).
Please investigate according to step (5), (6) and (7) once more if the
system alarm occurs again.
(REFERENCE)
in case of using debug function
Using the debug function with the address of the erroneous code,
which was discvered in section 6(c).
Set the break address with the parameter screen to the address where
the system error occurs (103:0408) and the execution will interrupt
at this point. In case of a break check the access point of the system
alarm code.
0344 26FF7702 PUSH ES
:[BX+2H]
In this case the value of ES and BX is to investigate.
Probably both became 0.