A82: Error handling
[Prev][Next][Index][Thread]
A82: Error handling
I have just added error handling to FPT-3, so that even if the numbers get
too big/small it wont crash. This is done by installing an error handler,
which the system then automatically calls if an error occurs. Installing
an error handler is actualy quite easy (see the code below), but it solves
a lot of problems when using FP math function. The code to install an
error handler is something like this:
LD HL,pointer_to_function_to_call_when_an_error_occurs
ROM_CALL(INST_ERROR_HAND)
When the program is finished you remove the handler using the following
code
ROM_CALL(REM_ERROR_HAND)
Dines
__________________________________________
Dines Justesen
Email: c958362@student.dtu.dk
WWW : http://www.student.dtu.dk/~c958362/
__________________________________________