.label print_error
POPx
POPxw
PSHxw PSHx table_find JSRw
POPyw
$0000 EQUyw print_error.unknown JCNw
PSHyw puts JSRw
RTS
.label print_error.unknown
errors.unknown puts JSRw
.label errors.table
.byte $00
.string "No error"
.byte $01
.string "Division by zero"
.byte $02
.string "User stack overflow"
.byte $03
.string "User stack underflow"
.byte $04
.string "System stack overflow"
.byte $05
.string "System stack underflow"
.byte $06
.string "Execution depth exceeded"
.byte $07
.string "Image not found"
.byte $08
.string "Image read error"
.byte $09
.string "Image too large"
.byte $0A
.string "Invalid opcode"
.byte $11
.string "Terminal not a TTY"
.byte $31
.string "File not found"
.byte $32
.string "Access denied"
.byte $33
.string "Invalid operation"
.byte $34
.string "Input/output error"
.byte $35
.string "Path too long"
.byte $36
.string "Buffer out of range"
.byte $37
.string "Symlink creation failed"
.byte $38
.string "Program execution failed"
.byte $39
.string "Splice/seek offset out of range"
.byte $3A
.string "File is too large"
.byte $41
.string "Beeper device failure"
.byte $42
.string "Beeper memory allocation error"
.byte $43
.string "Beeper playback failure"
.byte $FF
.label errors.unknown
.string "Unknown error"