摘要 |
PROBLEM TO BE SOLVED: To quickly find out a destruction and to prevent secondary and tertiary faults by detecting overflow and underflow by ANDing an offset value from the leading address value of a stack area to a current stack pointer value and a prescribed mask bit pattern value. SOLUTION: A base register, an offset register and a mask register are set by a dispatcher 201 and dispatched to a task 2. When the instruction of mov (0x10, SP), DO is executed inside the task 2, since the result of AND operation is '0', the abnormality of the stack area is not detected by a stack area abnormality detector and no interruption is generated. When the instruction of mov (-0x200, SP), DO is executed, however, the result of AND operation is not '0', the abnormality of the stack area is detected by the stack area abnormality detector, a message is displayed on a screen in a step 205 for reporting abnormality to a user and at the same time, the execution of a program is stopped. |