packed string support moved to Mega65 extra ROM segment
This commit is contained in:
1 parent
ebf8bf4eb7
commit
d1bc38694d
11 files changed
+47
-18
No files matched your search
@@ -1,5 +1,6 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# M65 BASIC_1 #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
packed_message_chars:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# M65 BASIC_1 #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
packed_keywords:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# M65 BASIC_1 #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
packed_message_tokens:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# M65 BASIC_1 #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
packed_message_words:
|
||||
|
||||
@@ -5,9 +5,15 @@
|
||||
// Computes Mapping the 64 p93
|
||||
|
||||
basic_do_error:
|
||||
|
||||
// Save error number
|
||||
phx_trash_a
|
||||
|
||||
#if ROM_LAYOUT_M65
|
||||
// Restore normal memory map
|
||||
jsr map_NORMAL
|
||||
#endif
|
||||
|
||||
// Print ? at start
|
||||
jsr print_return
|
||||
lda #$3F
|
||||
|
||||
@@ -12,13 +12,17 @@
|
||||
// Label definitions
|
||||
|
||||
.label VB1__INITMSG = $4000 + 2 * 0
|
||||
.label VB1__list_single_line = $4000 + 2 * 1
|
||||
.label VB1__tokenise_line = $4000 + 2 * 1
|
||||
.label VB1__list_single_line = $4000 + 2 * 2
|
||||
.label VB1__print_packed_message = $4000 + 2 * 3
|
||||
|
||||
#else
|
||||
|
||||
// Vector table (OpenROMs private!)
|
||||
|
||||
.word INITMSG
|
||||
.word tokenise_line
|
||||
.word list_single_line
|
||||
.word print_packed_message
|
||||
|
||||
#endif
|
||||
@@ -12,11 +12,8 @@
|
||||
.label JCHROUT = BASIC_0.proxy_B1_JCHROUT
|
||||
.label plot_set = KERNAL_0.plot_set
|
||||
.label basic_do_new = BASIC_0.proxy_B1_basic_do_new
|
||||
.label packed_keywords = BASIC_0.packed_keywords
|
||||
.label packed_word_search = BASIC_0.packed_word_search
|
||||
.label rom_revision_basic_string = BASIC_0.rom_revision_basic_string
|
||||
.label print_integer = BASIC_0.proxy_B1_print_integer
|
||||
.label print_packed_message = BASIC_0.proxy_B1_print_packed_message
|
||||
.label print_return = BASIC_0.proxy_B1_print_return
|
||||
.label print_space = BASIC_0.proxy_B1_print_space
|
||||
#if CONFIG_SHOW_PAL_NTSC
|
||||
@@ -25,3 +22,4 @@
|
||||
#if CONFIG_SHOW_FEATURES
|
||||
.label print_features = BASIC_0.proxy_B1_print_features
|
||||
#endif
|
||||
.label do_STRING_TOO_LONG_error = BASIC_0.do_STRING_TOO_LONG_error
|
||||
@@ -38,13 +38,6 @@ proxy_B1_print_integer:
|
||||
jmp map_BASIC_1
|
||||
|
||||
|
||||
proxy_B1_print_packed_message:
|
||||
|
||||
jsr map_NORMAL
|
||||
jsr print_packed_message
|
||||
jmp map_BASIC_1
|
||||
|
||||
|
||||
proxy_B1_print_return:
|
||||
|
||||
jsr map_NORMAL
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# M65 BASIC_1 #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Pack a word using the simple compression scheme.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# M65 * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// This routine prints messages that have been packed
|
||||
@@ -17,6 +18,14 @@
|
||||
print_packed_message:
|
||||
// .X = message number
|
||||
|
||||
#if (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
jsr map_BASIC_1
|
||||
jsr_ind VB1__print_packed_message
|
||||
jmp map_NORMAL
|
||||
|
||||
#else
|
||||
|
||||
lda #$ff
|
||||
ldy #$ff
|
||||
packed_message_search:
|
||||
@@ -230,3 +239,6 @@ is_uncommon_char:
|
||||
phy_trash_a
|
||||
|
||||
jmp has_nybl
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,5 +1,6 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# M65 * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Tokenise a line of BASIC
|
||||
@@ -8,6 +9,14 @@
|
||||
|
||||
tokenise_line:
|
||||
|
||||
#if (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
jsr map_BASIC_1
|
||||
jsr_ind VB1__tokenise_line
|
||||
jmp map_NORMAL
|
||||
|
||||
#else
|
||||
|
||||
// We need to consider each offset in the string to see if it matches
|
||||
// a token. No BASIC keyword is > 7 bytes, so we need to start with that
|
||||
// length (or remaining length of string) and count our way back down.
|
||||
@@ -270,3 +279,5 @@ done_searching_for_token:
|
||||
sec
|
||||
lda #$00
|
||||
rts
|
||||
|
||||
#endif // ROM layout
|
||||
Reference in new issue
Block a user