,ll 6.6
,cs 10
,pl 66
,lm 0.2,0.5
,pn 1
,ju
,hd
,ce
OmegaSoft 6809 Cross Pascal Language Handbook (V1.0)
,,
,ft

,ce 1
9B-##
,,
,ce
OmegaSoft 6809 Cross Pascal Language Handbook (V1.0)
,ce
APPENDIX

APPENDIX B - RUNTIME ERRORS

There are four types of runtime errors : range, I/O, conversion, and stack. The first three are individually maskable using the R, I, and C controls in the comment syntax. Stack errors are not maskable since they represent a limit exceeded and that the necessary information on the stack may no longer be valid enough to continue execution. Error codes 4 through 21 are defined for all systems and are listed here. 

RANGE ERRORS
 
Number    Error                    Where generated

+-----+------------------------+-----------------------------+
|  4  | Overflow               | Integer add, subtract, mul. |
|     |                        | and negate. Hex mult. Real  |
|     |                        | add, subtract, mult, divide.|
|     |                        | Log functions, Arcsin/cos   |
|     |                        |                             |
|  5  | Truncation             | Chr func. Character mult.   |
|     |                        | Real to integer conver.     |
|     |                        |                             |
|  6  | Divide by zero         | All div, mod operations and |
|     |                        | real /                      |
|     |                        |                             |
|  7  | Invalid argument for   | Square root, logs           |
|     | square root or log     |                             |
|     |                        |                             |
|  8  | Dynamic length assign  | String/set assignment       |
|     | error                  | size adjust (String/set     |
|     |                        | value parameters) String    |
|     |                        | concat.                     |
|     |                        |                             |
|  9  | Array index invalid    | Array indexing              |
|     |                        |                             |
| 10  | String index invalid   | String indexing, substr     |
|     |                        |                             |
| 11  | Subrange error         | assignment to subrange var. |
|     |                        |                             |
| 12  | Set element out of     | set construction            |
|     | range                  |                             |
+-----+------------------------+-----------------------------+ 

CONVERSION ERRORS
 
Number    Error                    Where generated

+-----+------------------------+-----------------------------+
| 13  | Integer conversion err.| Read of integer, Integer fnc|
|     |                        |                             |
| 14  | Hex conversion error   | Read of hex, hex function   |
|     |                        |                             |
| 15  | Real conversion error  | Read of real, real function |
|     |                        |                             |
| 16  | Boolean conversion err | Read of boolean, boolean fnc|
+-----+------------------------+-----------------------------+
,pg
,ce
RUNTIME ERRORS

I/O ERRORS
 
Number    Error                    Where generated

+-----+------------------------+-----------------------------+
| 17  | Device open/closed     | Get, Put, Read, Readln, Page|
|     | incorrect              | Write, Writeln, Open, Create|
|     |                        | Seek, Del                   |
|     |                        |                             |
| 18  | Device hit EOF         | Get, Read, Readln           |
+-----+------------------------+-----------------------------+
 
STACK ERRORS
 
Number    Error                    Where generated

+-----+------------------------+-----------------------------+
| 19  | Heap overflow          | Heap crashed into data stack|
|     |                        | or heap limit during NEW    |
|     |                        |                             |
| 20  | Data stack overflow    | Data stack crashed into heap|
|     |                        | or data stack limit during  |
|     |                        | stack allocation            |
|     |                        |                             |
| 21  | System stack overflow  | System stack crashed into   |
|     |                        | system stack limit during   |
|     |                        | Proc/Func calling           |
+-----+------------------------+-----------------------------+

USER GENERATED ERRORS
 
Number    Error                    Where generated

+-----+------------------------+-----------------------------+
| 22  | Program operation error| Halt(22) or Halt(#22)       |
+-----+------------------------+-----------------------------+

