-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathincBASICErrorHandler.asm
57 lines (48 loc) · 1.19 KB
/
incBASICErrorHandler.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
;*******************************************************************************
;* Error Handler Routine *
;*******************************************************************************
ErrorHandlerLo = $22
ErrorHandlerHi = $23
VEC_ErrorHandler
txa
pha
bpl @DisplayError
pla
jmp bas_ReadyPrompt$
@DisplayError
cmp #31
bcc @ROMError
sec
sbc #31
asl
tax
lda ErrorCodeAddr,x
sta ErrorHandlerLo
lda ErrorCodeAddr + 1,x
sta ErrorHandlerHi
pla
jmp bas_CustomError$
@ROMError
jsr COM_SCREEN
pla
tax
jmp bas_ROMError$ + 3
ErrorCodeADDR
; ToDo Add Error Codes
WORD ERRORCODE_31
WORD ERRORCODE_32
WORD ERRORCODE_33
ERRORCODE_31
TEXT "operationaL"
ERRORCODE_32
TEXT "this is error thirty twO"
ERRORCODE_33
TEXT "this is error thirty threE"
;******************************************************************************
;* Show Syntax Error *
;******************************************************************************
SYNTAX_ERROR
lda #32
sta 129
ldx #11
jmp (jmpvec_Error)