another small error handling optimization

This commit is contained in:
FeralChild64 committed 2020-06-06 13:21:10 +02:00
1 parent 6b8c9ded30
commit f889281534
3 files changed
+18 -25

No files matched your search

+15 -22
View File
@@ -33,6 +33,19 @@
// message that the $2C method would result in.
// XXX consider reworking the two errors below to reuse '$E6' mechanism
do_NOT_IMPLEMENTED_error:
ldx #36
bpl do_basic_error // branch always
do_MEMORY_CORRUPT_error:
ldx #35
bpl do_basic_error // branch always
do_kernal_error: // .A = KERNAL error code, also almost matches BASIC error codes
// Convert to BASIC error code
@@ -44,26 +57,7 @@ do_kernal_error: // .A = KERNAL error code, also almost ma
// FALLTROUGN
do_BREAK_error:
ldx #B_ERR_BREAK
bpl do_basic_error // branch always
do_NOT_IMPLEMENTED_error:
.byte $E6
do_MEMORY_CORRUPT_error:
.byte $E6
// the message "BYTES FREE"
.byte $E6
// the word ERROR
.byte $E6
// The word "SAVING"
.byte $E6
// The word "VERIFYING"
.byte $E6
// The word "LOADING"
.byte $E6
// The word "READY."
.byte $E6
do_LOAD_error:
.byte $E6
do_VERIFY_error:
@@ -148,13 +142,12 @@ do_TO_MANY_FILES_error:
do_basic_error: // error code in .X
// "?"
txa
phx_trash_a
pha
jsr print_return
lda #$3F
jsr JCHROUT
pla
tax
plx_trash_a
// Error message text + " ERROR"
+1 -1
View File
@@ -5,5 +5,5 @@
ready_message:
ldx #29
ldx #30
jmp print_packed_message
+2 -2
View File
@@ -157,9 +157,9 @@ char *error_list[]={
"UNDEF\'D FUNCTION", // https://www.saatchiart.com/print/Painting-Undef-d-Function-3495/16167/3829193/view
"VERIFY", // https://forums.openvpn.net/viewtopic.php?t=22040
"LOAD", // https://www.discogs.com/Gimmik-Load-Error/release/482462
"BREAK", // #29
// Non-error messages
"READY.\r", // #29 // https://www.ibm.com/support/knowledgecenter/zosbasics/com.ibm.zos.zconcepts/zconc_whatistsonative.htm https://github.com/stefanhaustein/expressionparser
"BREAK", // #30
"READY.\r", // #30 // https://www.ibm.com/support/knowledgecenter/zosbasics/com.ibm.zos.zconcepts/zconc_whatistsonative.htm https://github.com/stefanhaustein/expressionparser
" IN ", // #31
"BRK AT $", // #32
" ERROR", // #33 // Simply the word error that is attached to the other parts of messages https://fjkraan.home.xs4all.nl/comp/apple2faq/app2asoftfaq.html