hewlett-packard HP 9835A — 192

192 Errors and Error Processing Exit Conditions: The utility returns control to the BASIC driver which called the routine, appropriately setting conditions so that ERRL, ERRM$, and ERRN work as expected. Also triggers ON ERROR, if applicable. The utility can be used anywhere in your assembly language, wherever you would like to abort the execution of the current assembly language routine and where you would like to indicate to BASIC what reason (error) caused the abortion. For example, suppose somewhere in one of your assembly routines you wanted to abort the routine if a certain variable (Flag) is non-zero at a certain point.

Suppose also that the variable, when non-zero, contained the error number, then your program could look like - ISQURCE LDA Flag I ::;;Qi..JRC:E ::;;ZA 'it:'+2 ISQURCE J8M E~ror exit Similarly, there are some utilities which, when an error is encountered, return an error number in register A. In these case, a quick two-instruction sequence can give you an error-related abort. For example, the Rei_math utility is such a utility - As an example of a fatal error, suppose the error desired is 8. The error sequence could be - I80URCE LDA =100010B ISQURCE J8M Errc~ exit