all label naming conflicts resolved
This commit is contained in:
1 parent
9fd0297e51
commit
c3cbfcebfb
27 files changed
+222
-251
No files matched your search
@@ -73,7 +73,7 @@
|
||||
|
||||
.label ARISGN = $6F // -- NOT IMPLEMENTED --
|
||||
.label FACOV = $70 // FAC1 low order mantissa
|
||||
.label FBUFPT = $67 // $71-$72 -- NOT IMPLEMENTED --
|
||||
.label FBUFPT = $71 // $71-$72 -- NOT IMPLEMENTED --
|
||||
.label CHRGET = $73 // $73-$8A -- NOT IMPLEMENTED --
|
||||
.label TXTPTR = $7A // $7A-$7B current BASIC statement pointer
|
||||
.label RNDX = $8B // $8B-$8F -- NOT IMPLEMENTED --
|
||||
|
||||
@@ -16,20 +16,3 @@
|
||||
.label __memmove_src = $69
|
||||
.label __memmove_dst = $6B
|
||||
.label __memmove_size = $6D
|
||||
|
||||
// XXX cleanup lines below
|
||||
|
||||
// The various pointers that separate memory regions for BASIC storage
|
||||
// We have multiple names for the ones that mark the boundary of regions.
|
||||
.label basic_start_of_text_ptr = $2b
|
||||
.label basic_end_of_text_ptr = $2d
|
||||
.label basic_start_of_vars_ptr = $2d
|
||||
.label basic_end_of_vars_ptr = $2f
|
||||
.label basic_start_of_arrays_ptr = $2f
|
||||
.label basic_end_of_arrays_ptr = $31
|
||||
.label basic_start_of_free_space_ptr = $31
|
||||
.label basic_start_of_strings_ptr = $33
|
||||
.label basic_top_of_memory_ptr = $37
|
||||
.label basic_current_line_number = $39
|
||||
.label basic_previous_line_number = $3b
|
||||
.label basic_current_line_ptr = $3d
|
||||
@@ -41,12 +41,12 @@ basic_cold_start:
|
||||
|
||||
// Work out free bytes, display them
|
||||
jsr basic_do_new
|
||||
lda basic_top_of_memory_ptr+0
|
||||
lda MEMSIZ+0
|
||||
sec
|
||||
sbc basic_start_of_text_ptr+0
|
||||
sbc TXTTAB+0
|
||||
tax
|
||||
lda basic_top_of_memory_ptr+1
|
||||
sbc basic_start_of_text_ptr+1
|
||||
lda MEMSIZ+1
|
||||
sbc TXTTAB+1
|
||||
|
||||
jsr print_integer
|
||||
|
||||
|
||||
@@ -9,18 +9,18 @@ basic_delete_line:
|
||||
|
||||
// jsr printf
|
||||
// .text "DELETING LINE AT $"
|
||||
// .byte $f1,<basic_current_line_ptr,>basic_current_line_ptr
|
||||
// .byte $f0,<basic_current_line_ptr,>basic_current_line_ptr
|
||||
// .byte $f1,<OLDTXT,>OLDTXT
|
||||
// .byte $f0,<OLDTXT,>OLDTXT
|
||||
// .byte $0d,0
|
||||
|
||||
// Get address of next line
|
||||
ldy #0
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<basic_current_line_ptr
|
||||
ldx #<OLDTXT
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
sta __tokenise_work3
|
||||
@@ -29,7 +29,7 @@ basic_delete_line:
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
sta __tokenise_work4
|
||||
@@ -37,10 +37,10 @@ basic_delete_line:
|
||||
// Work out length of this line by looking at the pointer
|
||||
lda __tokenise_work3
|
||||
sec
|
||||
sbc basic_current_line_ptr+0
|
||||
sbc OLDTXT+0
|
||||
sta __tokenise_work3
|
||||
lda __tokenise_work4
|
||||
sbc basic_current_line_ptr+1
|
||||
sbc OLDTXT+1
|
||||
sta __tokenise_work4
|
||||
|
||||
// jsr printf
|
||||
@@ -70,13 +70,13 @@ basic_delete_line:
|
||||
// Now decrease top of BASIC mem
|
||||
pla
|
||||
sta __tokenise_work3
|
||||
lda basic_end_of_text_ptr+0
|
||||
lda VARTAB+0
|
||||
sec
|
||||
sbc __tokenise_work3
|
||||
sta basic_end_of_text_ptr+0
|
||||
lda basic_end_of_text_ptr+1
|
||||
sta VARTAB+0
|
||||
lda VARTAB+1
|
||||
sbc #0
|
||||
sta basic_end_of_text_ptr+1
|
||||
sta VARTAB+1
|
||||
|
||||
clc
|
||||
rts
|
||||
@@ -36,7 +36,7 @@ basic_execute_statement:
|
||||
// Check for RUN/STOP
|
||||
lda STKEY
|
||||
bmi !+
|
||||
jmp basic_do_break
|
||||
jmp cmd_stop
|
||||
!:
|
||||
// Skip over any white space and :
|
||||
ldy #0
|
||||
@@ -53,8 +53,8 @@ basic_execute_statement:
|
||||
|
||||
// jsr printf
|
||||
// .text "LINE PTR = $"
|
||||
// .byte $f1,<basic_current_line_ptr,>basic_current_line_ptr
|
||||
// .byte $f0,<basic_current_line_ptr,>basic_current_line_ptr
|
||||
// .byte $f1,<OLDTXT,>OLDTXT
|
||||
// .byte $f0,<OLDTXT,>OLDTXT
|
||||
// .text ", STATEMENT PTR = $"
|
||||
// .byte $f1,<TXTPTR,>TXTPTR
|
||||
// .byte $f0,<TXTPTR,>TXTPTR
|
||||
@@ -119,7 +119,7 @@ not_a_token:
|
||||
// BASIC programmers should implement communication with drives
|
||||
// the standard way, handling channels properly. Besides,
|
||||
// current implementation does not support characters under ROM
|
||||
ldx basic_current_line_number+1
|
||||
ldx CURLIN+1
|
||||
cpx #$ff
|
||||
bne !+
|
||||
// We are in direct mode, allow wedge to handle '@' sign
|
||||
@@ -175,7 +175,7 @@ basic_end_of_line:
|
||||
// one.
|
||||
|
||||
// Are we in direct mode
|
||||
lda basic_current_line_number+1
|
||||
lda CURLIN+1
|
||||
cmp #$ff
|
||||
bne basic_not_direct_mode
|
||||
|
||||
@@ -184,17 +184,17 @@ basic_end_of_line:
|
||||
|
||||
basic_not_direct_mode:
|
||||
// Copy line number to previous line number
|
||||
lda basic_current_line_number+0
|
||||
sta basic_previous_line_number+0
|
||||
lda basic_current_line_number+1
|
||||
sta basic_previous_line_number+1
|
||||
lda CURLIN+0
|
||||
sta OLDLIN+0
|
||||
lda CURLIN+1
|
||||
sta OLDLIN+1
|
||||
|
||||
// Advance the basic line pointer to the next line
|
||||
jsr basic_follow_link_to_next_line
|
||||
|
||||
// Are we at the end of the program?
|
||||
lda basic_current_line_ptr+0
|
||||
ora basic_current_line_ptr+1
|
||||
lda OLDTXT+0
|
||||
ora OLDTXT+1
|
||||
bne basic_execute_from_current_line
|
||||
|
||||
// End of program found
|
||||
@@ -210,33 +210,33 @@ basic_execute_from_current_line:
|
||||
jmp basic_main_loop
|
||||
!:
|
||||
// Skip pointer and line number to get address of first statement
|
||||
lda basic_current_line_ptr+0
|
||||
lda OLDTXT+0
|
||||
clc
|
||||
adc #4
|
||||
sta TXTPTR+0
|
||||
lda basic_current_line_ptr+1
|
||||
lda OLDTXT+1
|
||||
adc #0
|
||||
sta TXTPTR+1
|
||||
|
||||
ldy #2
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<basic_current_line_ptr
|
||||
ldx #<OLDTXT
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
sta basic_current_line_number+0
|
||||
sta CURLIN+0
|
||||
iny
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
sta basic_current_line_number+1
|
||||
sta CURLIN+1
|
||||
|
||||
jmp basic_execute_statement
|
||||
|
||||
|
||||
+12
-12
@@ -3,10 +3,10 @@
|
||||
|
||||
basic_find_line:
|
||||
// Get pointer to start of BASIC text
|
||||
lda basic_start_of_text_ptr+0
|
||||
sta basic_current_line_ptr+0
|
||||
lda basic_start_of_text_ptr+1
|
||||
sta basic_current_line_ptr+1
|
||||
lda TXTTAB+0
|
||||
sta OLDTXT+0
|
||||
lda TXTTAB+1
|
||||
sta OLDTXT+1
|
||||
|
||||
basic_find_line_loop:
|
||||
// Then search for line number
|
||||
@@ -15,10 +15,10 @@ basic_find_line_loop:
|
||||
ldy #3
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<basic_current_line_ptr+0
|
||||
ldx #<OLDTXT+0
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
cmp LINNUM+1
|
||||
@@ -32,7 +32,7 @@ basic_find_line_loop:
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
cmp LINNUM+0
|
||||
@@ -59,10 +59,10 @@ more_lines_exist:
|
||||
ldy #0
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<basic_current_line_ptr+0
|
||||
ldx #<OLDTXT+0
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
sta $0100
|
||||
@@ -71,11 +71,11 @@ more_lines_exist:
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
sta basic_current_line_ptr+1
|
||||
sta OLDTXT+1
|
||||
lda $0100
|
||||
sta basic_current_line_ptr+0
|
||||
sta OLDTXT+0
|
||||
|
||||
jmp basic_find_line_loop
|
||||
@@ -1,4 +1,4 @@
|
||||
// Advance basic_current_line_ptr by following the
|
||||
// Advance OLDTXT by following the
|
||||
// link to the next line
|
||||
|
||||
basic_find_next_line:
|
||||
@@ -6,10 +6,10 @@ basic_find_next_line:
|
||||
ldy #0
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<basic_current_line_ptr+0
|
||||
ldx #<OLDTXT+0
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
pha
|
||||
@@ -18,10 +18,10 @@ basic_find_next_line:
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
sta basic_current_line_ptr+1
|
||||
sta OLDTXT+1
|
||||
pla
|
||||
sta basic_current_line_ptr+0
|
||||
sta OLDTXT+0
|
||||
rts
|
||||
@@ -2,10 +2,10 @@ basic_follow_link_to_next_line:
|
||||
ldy #0
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<basic_current_line_ptr+0
|
||||
ldx #<OLDTXT+0
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
pha
|
||||
@@ -14,10 +14,10 @@ basic_follow_link_to_next_line:
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
sta basic_current_line_ptr+1
|
||||
sta OLDTXT+1
|
||||
pla
|
||||
sta basic_current_line_ptr+0
|
||||
sta OLDTXT+0
|
||||
rts
|
||||
@@ -18,13 +18,13 @@ basic_insert_line:
|
||||
|
||||
// jsr printf
|
||||
// .text "INSERTING LINE AT $"
|
||||
// .byte $f1,<basic_current_line_ptr,>basic_current_line_ptr
|
||||
// .byte $f0,<basic_current_line_ptr,>basic_current_line_ptr
|
||||
// .byte $f1,<OLDTXT,>OLDTXT
|
||||
// .byte $f0,<OLDTXT,>OLDTXT
|
||||
// .byte $0d,0
|
||||
|
||||
lda basic_current_line_ptr+0
|
||||
lda OLDTXT+0
|
||||
pha
|
||||
lda basic_current_line_ptr+1
|
||||
lda OLDTXT+1
|
||||
|
||||
pha
|
||||
|
||||
@@ -44,27 +44,27 @@ basic_insert_line:
|
||||
// Now increase top of BASIC mem
|
||||
pla
|
||||
clc
|
||||
adc basic_end_of_text_ptr+0
|
||||
sta basic_end_of_text_ptr+0
|
||||
lda basic_end_of_text_ptr+1
|
||||
adc VARTAB+0
|
||||
sta VARTAB+0
|
||||
lda VARTAB+1
|
||||
adc #0
|
||||
sta basic_end_of_text_ptr+1
|
||||
sta VARTAB+1
|
||||
|
||||
// Get pointer back
|
||||
pla
|
||||
sta basic_current_line_ptr+1
|
||||
sta OLDTXT+1
|
||||
pla
|
||||
sta basic_current_line_ptr+0
|
||||
sta OLDTXT+0
|
||||
|
||||
// Write the line number
|
||||
ldy #2
|
||||
lda LINNUM+0
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<basic_current_line_ptr+0
|
||||
ldx #<OLDTXT+0
|
||||
jsr poke_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
sta (basic_current_line_ptr),y
|
||||
sta (OLDTXT),y
|
||||
#endif
|
||||
|
||||
iny
|
||||
@@ -73,7 +73,7 @@ basic_insert_line:
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
jsr poke_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
sta (basic_current_line_ptr),y
|
||||
sta (OLDTXT),y
|
||||
#endif
|
||||
|
||||
// Now store the line body itself
|
||||
@@ -85,10 +85,10 @@ line_store_loop:
|
||||
iny
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<basic_current_line_ptr+0
|
||||
ldx #<OLDTXT+0
|
||||
jsr poke_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
sta (basic_current_line_ptr),y
|
||||
sta (OLDTXT),y
|
||||
#endif
|
||||
|
||||
lda __tokenise_work1
|
||||
|
||||
@@ -139,13 +139,13 @@ not_a_line:
|
||||
|
||||
// There is no stored line, so zero that pointer out
|
||||
lda #$00
|
||||
sta basic_current_line_ptr+0
|
||||
sta basic_current_line_ptr+1
|
||||
sta OLDTXT+0
|
||||
sta OLDTXT+1
|
||||
|
||||
// Put invalid line number in current line number value,
|
||||
// so that we know we are in direct mode
|
||||
// (Compute's Mapping the 64 p19)
|
||||
lda #$ff
|
||||
sta basic_current_line_number+1
|
||||
sta CURLIN+1
|
||||
|
||||
jmp basic_execute_statement
|
||||
@@ -2,35 +2,35 @@ basic_shift_mem_down_and_relink:
|
||||
// Shift memory down to basic_current_line_pointer
|
||||
// from X bytes further along.
|
||||
|
||||
// Destination is basic_current_line_ptr
|
||||
lda basic_current_line_ptr+0
|
||||
// Destination is OLDTXT
|
||||
lda OLDTXT+0
|
||||
sta __memmove_dst+0
|
||||
lda basic_current_line_ptr+1
|
||||
lda OLDTXT+1
|
||||
sta __memmove_dst+1
|
||||
|
||||
// Source is that plus X
|
||||
txa
|
||||
pha // also keep for later
|
||||
clc
|
||||
adc basic_current_line_ptr+0
|
||||
adc OLDTXT+0
|
||||
sta __memmove_src+0
|
||||
lda basic_current_line_ptr+1
|
||||
lda OLDTXT+1
|
||||
adc #0
|
||||
sta __memmove_src+1
|
||||
|
||||
// Size is distance from source to end of BASIC text.
|
||||
lda basic_end_of_text_ptr+0
|
||||
lda VARTAB+0
|
||||
sec
|
||||
sbc __memmove_src+0
|
||||
sta __memmove_size+0
|
||||
lda basic_end_of_text_ptr+1
|
||||
lda VARTAB+1
|
||||
sbc __memmove_src+1
|
||||
sta __memmove_size+1
|
||||
|
||||
// jsr printf
|
||||
// .text "TOP OF BASIC = $"
|
||||
// .byte $f1,<basic_end_of_text_ptr,>basic_end_of_text_ptr
|
||||
// .byte $f0,<basic_end_of_text_ptr,>basic_end_of_text_ptr
|
||||
// .byte $f1,<VARTAB,>VARTAB
|
||||
// .byte $f0,<VARTAB,>VARTAB
|
||||
// .byte $0d
|
||||
// .text "SHIFTING DOWN $"
|
||||
// .byte $f1,<__memmove_size,>__memmove_size
|
||||
@@ -116,10 +116,10 @@ relink_down_next_line:
|
||||
ldy #0
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<basic_current_line_ptr+0
|
||||
ldx #<OLDTXT+0
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
sec
|
||||
@@ -130,7 +130,7 @@ relink_down_next_line:
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
sbc #0
|
||||
@@ -140,10 +140,10 @@ relink_down_next_line:
|
||||
lda __memmove_src+0
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<basic_current_line_ptr+0
|
||||
ldx #<OLDTXT+0
|
||||
jsr poke_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
sta (basic_current_line_ptr),y
|
||||
sta (OLDTXT),y
|
||||
#endif
|
||||
|
||||
iny
|
||||
@@ -152,15 +152,15 @@ relink_down_next_line:
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
jsr poke_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
sta (basic_current_line_ptr),y
|
||||
sta (OLDTXT),y
|
||||
#endif
|
||||
|
||||
relink_down_loop:
|
||||
// Now advance pointer to the next line,
|
||||
lda __memmove_src+0
|
||||
sta basic_current_line_ptr+0
|
||||
sta OLDTXT+0
|
||||
lda __memmove_src+1
|
||||
sta basic_current_line_ptr+1
|
||||
sta OLDTXT+1
|
||||
|
||||
// Have we run out of lines to patch?
|
||||
jsr peek_line_pointer_null_check
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
basic_shift_mem_up_and_relink:
|
||||
// Shift memory up from basic_current_line_ptr
|
||||
// Shift memory up from OLDTXT
|
||||
// X bytes.
|
||||
|
||||
// NOTE: Pointers need to be reduced by one, due to the way
|
||||
@@ -9,9 +9,9 @@ basic_shift_mem_up_and_relink:
|
||||
// Work out end point of destination
|
||||
txa
|
||||
clc
|
||||
adc basic_end_of_text_ptr+0
|
||||
adc VARTAB+0
|
||||
sta __memmove_dst+0
|
||||
lda basic_end_of_text_ptr+1
|
||||
lda VARTAB+1
|
||||
adc #0
|
||||
sta __memmove_dst+1
|
||||
lda __memmove_dst+0
|
||||
@@ -23,27 +23,27 @@ basic_shift_mem_up_and_relink:
|
||||
sta __memmove_dst+1
|
||||
|
||||
// End point of source is just current end of BASIC text
|
||||
lda basic_end_of_text_ptr+0
|
||||
lda VARTAB+0
|
||||
sec
|
||||
sbc #1
|
||||
sta __memmove_src+0
|
||||
lda basic_end_of_text_ptr+1
|
||||
lda VARTAB+1
|
||||
sbc #0
|
||||
sta __memmove_src+1
|
||||
|
||||
// Work out size of region to copy
|
||||
lda basic_end_of_text_ptr+0
|
||||
lda VARTAB+0
|
||||
sec
|
||||
sbc basic_current_line_ptr+0
|
||||
sbc OLDTXT+0
|
||||
sta __memmove_size+0
|
||||
lda basic_end_of_text_ptr+1
|
||||
sbc basic_current_line_ptr+1
|
||||
lda VARTAB+1
|
||||
sbc OLDTXT+1
|
||||
sta __memmove_size+1
|
||||
|
||||
// jsr printf
|
||||
// .text "TOP OF BASIC = $"
|
||||
// .byte $f1,<basic_end_of_text_ptr,>basic_end_of_text_ptr
|
||||
// .byte $f0,<basic_end_of_text_ptr,>basic_end_of_text_ptr
|
||||
// .byte $f1,<VARTAB,>VARTAB
|
||||
// .byte $f0,<VARTAB,>VARTAB
|
||||
// .byte $0d
|
||||
// .text "SHIFTING UP $"
|
||||
// .byte $f1,<__memmove_size,>__memmove_size
|
||||
@@ -106,22 +106,22 @@ basic_shift_mem_up_and_relink:
|
||||
// to make it end up pointing to the next line
|
||||
ldy #0
|
||||
|
||||
lda basic_current_line_ptr+0
|
||||
lda OLDTXT+0
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<basic_current_line_ptr+0
|
||||
ldx #<OLDTXT+0
|
||||
jsr poke_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
sta (basic_current_line_ptr),y
|
||||
sta (OLDTXT),y
|
||||
#endif
|
||||
|
||||
iny
|
||||
lda basic_current_line_ptr+1
|
||||
lda OLDTXT+1
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
jsr poke_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
sta (basic_current_line_ptr),y
|
||||
sta (OLDTXT),y
|
||||
#endif
|
||||
|
||||
relink_up_next_line:
|
||||
@@ -132,10 +132,10 @@ relink_up_next_line:
|
||||
ldy #0
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<basic_current_line_ptr+0
|
||||
ldx #<OLDTXT+0
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
sta __memmove_dst+0
|
||||
@@ -149,7 +149,7 @@ relink_up_next_line:
|
||||
jsr peek_under_roms
|
||||
cmp #$00
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
sta __memmove_dst+1
|
||||
@@ -159,8 +159,8 @@ relink_up_next_line:
|
||||
|
||||
// jsr printf
|
||||
// .text "LINE ADDR = $"
|
||||
// .byte $f1,<basic_current_line_ptr,>basic_end_of_text_ptr
|
||||
// .byte $f0,<basic_current_line_ptr,>basic_end_of_text_ptr
|
||||
// .byte $f1,<OLDTXT,>VARTAB
|
||||
// .byte $f0,<OLDTXT,>VARTAB
|
||||
// .text $d," BEFORE = $"
|
||||
// .byte $f1,<__memmove_dst,>__memmove_dst
|
||||
// .byte $f0,<__memmove_dst,>__memmove_dst
|
||||
@@ -175,10 +175,10 @@ relink_up_next_line:
|
||||
lda __memmove_src+0
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<basic_current_line_ptr+0
|
||||
ldx #<OLDTXT+0
|
||||
jsr poke_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
sta (basic_current_line_ptr),y
|
||||
sta (OLDTXT),y
|
||||
#endif
|
||||
|
||||
iny
|
||||
@@ -187,15 +187,15 @@ relink_up_next_line:
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
jsr poke_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
sta (basic_current_line_ptr),y
|
||||
sta (OLDTXT),y
|
||||
#endif
|
||||
|
||||
relink_up_loop:
|
||||
// Now advance pointer to the next line,
|
||||
lda __memmove_src+0
|
||||
sta basic_current_line_ptr+0
|
||||
sta OLDTXT+0
|
||||
lda __memmove_src+1
|
||||
sta basic_current_line_ptr+1
|
||||
sta OLDTXT+1
|
||||
|
||||
// Have we run out of lines to patch?
|
||||
jsr peek_line_pointer_null_check
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
cmd_stop:
|
||||
basic_do_break:
|
||||
cmd_stop:
|
||||
jsr printf // XXX don't use printf, use packed messages!
|
||||
.text "BREAK"
|
||||
.byte 0
|
||||
|
||||
// Check for direct mode
|
||||
// Are we in direct mode
|
||||
lda basic_current_line_number+1
|
||||
lda CURLIN+1
|
||||
cmp #$FF
|
||||
beq !+
|
||||
// Not direct mode
|
||||
jsr printf // XXX don't use printf, use packed messages!
|
||||
.text " IN "
|
||||
.byte 0
|
||||
lda basic_current_line_number+1
|
||||
ldx basic_current_line_number+0
|
||||
lda CURLIN+1
|
||||
ldx CURLIN+0
|
||||
jsr print_integer
|
||||
|
||||
|
||||
!:
|
||||
lda #$0D
|
||||
jsr JCHROUT
|
||||
|
||||
+11
-11
@@ -4,21 +4,21 @@
|
||||
cmd_list:
|
||||
|
||||
// Set current line pointer to start of memory
|
||||
lda basic_start_of_text_ptr+0
|
||||
sta basic_current_line_ptr+0
|
||||
lda basic_start_of_text_ptr+1
|
||||
sta basic_current_line_ptr+1
|
||||
lda TXTTAB+0
|
||||
sta OLDTXT+0
|
||||
lda TXTTAB+1
|
||||
sta OLDTXT+1
|
||||
|
||||
list_loop:
|
||||
|
||||
ldy #1
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<basic_current_line_ptr+0
|
||||
ldx #<OLDTXT+0
|
||||
jsr peek_under_roms
|
||||
cmp #$00
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
bne list_more_lines
|
||||
@@ -31,7 +31,7 @@ list_loop:
|
||||
list_more_lines:
|
||||
lda STKEY
|
||||
bmi !+
|
||||
jmp basic_do_break
|
||||
jmp cmd_stop
|
||||
!:
|
||||
jsr list_single_line
|
||||
// Now link to the next line
|
||||
@@ -45,7 +45,7 @@ list_single_line: // entry point needed by DOS wedge
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
pha
|
||||
@@ -54,7 +54,7 @@ list_single_line: // entry point needed by DOS wedge
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
tax
|
||||
@@ -72,11 +72,11 @@ list_single_line: // entry point needed by DOS wedge
|
||||
list_print_loop:
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<basic_current_line_ptr
|
||||
ldx #<OLDTXT
|
||||
jsr peek_under_roms
|
||||
cmp #$00
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
beq list_end_of_line
|
||||
|
||||
+27
-27
@@ -13,7 +13,7 @@ cmd_load:
|
||||
|
||||
// Setup Kernal to print control messages or not
|
||||
lda #$80 // display control messages and omit error messages
|
||||
ldx basic_current_line_number+1
|
||||
ldx CURLIN+1
|
||||
cpx #$FF
|
||||
beq !+
|
||||
lda #$00 // direct mode - don't display anything
|
||||
@@ -112,8 +112,8 @@ got_loadaddress:
|
||||
|
||||
!:
|
||||
// $YYXX is the last loaded address, so store it
|
||||
stx basic_end_of_text_ptr+0
|
||||
sty basic_end_of_text_ptr+1
|
||||
stx VARTAB+0
|
||||
sty VARTAB+1
|
||||
|
||||
// Now relink the loaded program, as we cannot trust the line
|
||||
// links supplied. For example, the VICE virtual drive emulation
|
||||
@@ -124,33 +124,33 @@ got_loadaddress:
|
||||
// or go back to the READY prompt if LOAD was called from direct mode.
|
||||
|
||||
// Reset to start of program
|
||||
lda basic_start_of_text_ptr+0
|
||||
sta basic_current_line_ptr+0
|
||||
lda basic_start_of_text_ptr+1
|
||||
sta basic_current_line_ptr+1
|
||||
lda TXTTAB+0
|
||||
sta OLDTXT+0
|
||||
lda TXTTAB+1
|
||||
sta OLDTXT+1
|
||||
|
||||
// XXX - should run program if LOAD was used in program mode
|
||||
jmp basic_main_loop
|
||||
|
||||
|
||||
basic_relink_program:
|
||||
|
||||
// Start by getting pointer to the first line
|
||||
lda basic_start_of_text_ptr+0
|
||||
sta basic_current_line_ptr+0
|
||||
lda basic_start_of_text_ptr+1
|
||||
sta basic_current_line_ptr+1
|
||||
|
||||
basic_relink_loop:
|
||||
// Start by getting pointer to the first line
|
||||
lda TXTTAB+0
|
||||
sta OLDTXT+0
|
||||
lda TXTTAB+1
|
||||
sta OLDTXT+1
|
||||
|
||||
basic_relink_loop:
|
||||
// Is the pointer to the end of the program
|
||||
ldy #1
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<basic_current_line_ptr+0
|
||||
ldx #<OLDTXT+0
|
||||
jsr peek_under_roms
|
||||
cmp #$00
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
bne !+
|
||||
@@ -164,10 +164,10 @@ basic_relink_loop:
|
||||
end_of_line_search:
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<basic_current_line_ptr+0
|
||||
ldx #<OLDTXT+0
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
cmp #$00
|
||||
@@ -185,37 +185,37 @@ end_of_line_search:
|
||||
|
||||
// First, skip over the $00 char
|
||||
iny
|
||||
|
||||
|
||||
// Now overwrite the pointer (carefully)
|
||||
//
|
||||
//
|
||||
tya
|
||||
clc
|
||||
adc basic_current_line_ptr+0
|
||||
adc OLDTXT+0
|
||||
pha
|
||||
php
|
||||
ldy #0
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<basic_current_line_ptr+0
|
||||
ldx #<OLDTXT+0
|
||||
jsr poke_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
sta (basic_current_line_ptr),y
|
||||
sta (OLDTXT),y
|
||||
#endif
|
||||
|
||||
plp
|
||||
lda basic_current_line_ptr+1
|
||||
lda OLDTXT+1
|
||||
adc #0
|
||||
ldy #1
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
jsr poke_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
sta (basic_current_line_ptr),y
|
||||
sta (OLDTXT),y
|
||||
#endif
|
||||
|
||||
sta basic_current_line_ptr+1
|
||||
sta OLDTXT+1
|
||||
pla
|
||||
sta basic_current_line_ptr+0
|
||||
sta OLDTXT+0
|
||||
|
||||
jmp basic_relink_loop
|
||||
|
||||
|
||||
+20
-20
@@ -15,20 +15,20 @@ cmd_clr:
|
||||
basic_do_new:
|
||||
// Setup pointers to memory storage XXX should depend on text start vector
|
||||
lda #<$0801
|
||||
sta basic_start_of_text_ptr+0
|
||||
sta TXTTAB+0
|
||||
lda #>$0801
|
||||
sta basic_start_of_text_ptr+1
|
||||
sta basic_start_of_vars_ptr+1
|
||||
sta TXTTAB+1
|
||||
sta VARTAB+1
|
||||
lda #<$0803
|
||||
sta basic_start_of_vars_ptr+0
|
||||
sta VARTAB+0
|
||||
|
||||
// Zero line pointer
|
||||
// XXX - We should also zero $0800, i.e., basic_start_of_text_ptr - 1
|
||||
// XXX - We should also zero $0800, i.e., TXTTAB - 1
|
||||
ldy #$00
|
||||
tya
|
||||
sta (basic_start_of_text_ptr),y
|
||||
sta (TXTTAB),y
|
||||
iny
|
||||
sta (basic_start_of_text_ptr),y
|
||||
sta (TXTTAB),y
|
||||
|
||||
|
||||
// Get top of memory.
|
||||
@@ -39,7 +39,7 @@ basic_do_new:
|
||||
// free for some optimisation structures, e.g., FOR/NEXT loop
|
||||
// records (without them going on the stack), GOSUB stack
|
||||
// (same story), expression value cache?
|
||||
|
||||
|
||||
sec // Read, not write value
|
||||
jsr JMEMTOP
|
||||
cpx #$80
|
||||
@@ -56,25 +56,25 @@ basic_do_new:
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda #>$A000
|
||||
#endif
|
||||
sta basic_top_of_memory_ptr+1
|
||||
sta basic_start_of_strings_ptr+1
|
||||
sta MEMSIZ+1
|
||||
sta FRETOP+1
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
lda #<$F7FF
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda #<$A000
|
||||
#endif
|
||||
sta basic_top_of_memory_ptr+0
|
||||
sta basic_start_of_strings_ptr+0
|
||||
|
||||
sta MEMSIZ+0
|
||||
sta FRETOP+0
|
||||
|
||||
// FALL THROUGH
|
||||
|
||||
|
||||
basic_do_clr:
|
||||
// Clear variables, arrays and strings
|
||||
lda basic_start_of_vars_ptr+0
|
||||
sta basic_start_of_arrays_ptr+0
|
||||
sta basic_start_of_free_space_ptr+0
|
||||
lda basic_start_of_vars_ptr+1
|
||||
sta basic_start_of_arrays_ptr+1
|
||||
sta basic_start_of_free_space_ptr+1
|
||||
lda VARTAB+0
|
||||
sta ARYTAB+0
|
||||
sta STREND+0
|
||||
lda VARTAB+1
|
||||
sta ARYTAB+1
|
||||
sta STREND+1
|
||||
|
||||
rts
|
||||
+6
-6
@@ -1,13 +1,13 @@
|
||||
cmd_run:
|
||||
// RUN clears all variables
|
||||
jsr basic_do_clr
|
||||
cmd_goto:
|
||||
cmd_goto:
|
||||
// Reset line pointer to first line of program.
|
||||
lda basic_start_of_text_ptr+0
|
||||
sta basic_current_line_ptr+0
|
||||
lda basic_start_of_text_ptr+1
|
||||
sta basic_current_line_ptr+1
|
||||
|
||||
lda TXTTAB+0
|
||||
sta OLDTXT+0
|
||||
lda TXTTAB+1
|
||||
sta OLDTXT+1
|
||||
|
||||
jsr basic_end_of_statement_check
|
||||
bcs !+
|
||||
|
||||
|
||||
@@ -120,12 +120,12 @@ do_TO_MANY_FILES_error:
|
||||
lda $EA
|
||||
and #$80
|
||||
sta $EA
|
||||
|
||||
|
||||
// FALL THROUGH
|
||||
|
||||
// Error # in X
|
||||
|
||||
do_basic_error:
|
||||
|
||||
do_basic_error:
|
||||
// "?"
|
||||
txa
|
||||
pha
|
||||
@@ -142,12 +142,12 @@ do_basic_error:
|
||||
// A space between error name and word error
|
||||
lda #$20
|
||||
jsr $ffd2
|
||||
|
||||
|
||||
// "ERROR"
|
||||
ldx #33
|
||||
jsr print_packed_message
|
||||
|
||||
lda basic_current_line_number+1
|
||||
lda CURLIN+1
|
||||
cmp #$ff
|
||||
beq !+
|
||||
|
||||
@@ -156,8 +156,8 @@ do_basic_error:
|
||||
.text " IN "
|
||||
.byte 0
|
||||
|
||||
lda basic_current_line_number+1
|
||||
ldx basic_current_line_number+0
|
||||
lda CURLIN+1
|
||||
ldx CURLIN+0
|
||||
jsr print_integer
|
||||
!:
|
||||
// New lines
|
||||
|
||||
@@ -56,7 +56,7 @@ injest_number:
|
||||
ldy #$00
|
||||
lda (TXTPTR),y
|
||||
cmp #$AB
|
||||
bne ij_not_minus
|
||||
bne ij_loop1 // not minus
|
||||
|
||||
// Set sign to negative
|
||||
lda #$ff
|
||||
@@ -64,9 +64,6 @@ injest_number:
|
||||
|
||||
// Skip over the minus sign
|
||||
jsr basic_consume_character
|
||||
|
||||
ij_not_minus:
|
||||
|
||||
|
||||
ij_loop1:
|
||||
ldy #$00
|
||||
|
||||
@@ -6,11 +6,11 @@ peek_line_pointer_null_check:
|
||||
ldy #$00
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<basic_current_line_ptr+0
|
||||
ldx #<OLDTXT+0
|
||||
jsr peek_under_roms
|
||||
cmp #$00
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
bne ptr_not_null
|
||||
@@ -20,7 +20,7 @@ peek_line_pointer_null_check:
|
||||
jsr peek_under_roms
|
||||
cmp #$00
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (basic_current_line_ptr),y
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
bne ptr_not_null
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
|
||||
install_ram_routines:
|
||||
// Copy routines into place
|
||||
ldx #ram_routines_end-ram_routines_start-1
|
||||
ldx #__ram_routines_end-__ram_routines_start-1
|
||||
!:
|
||||
lda ram_routines_start,x
|
||||
lda __ram_routines_start,x
|
||||
sta tiny_nmi_handler,x
|
||||
dex
|
||||
bpl !-
|
||||
@@ -23,7 +23,7 @@ install_ram_routines:
|
||||
|
||||
rts
|
||||
|
||||
ram_routines_start:
|
||||
__ram_routines_start:
|
||||
|
||||
// XXX - Routine order must match that of the KERNAL version of the file.
|
||||
// (since it has fewer routines)
|
||||
@@ -107,7 +107,7 @@ smd1:
|
||||
plp
|
||||
jmp memmap_normal
|
||||
|
||||
ram_routines_end:
|
||||
__ram_routines_end:
|
||||
|
||||
#else // CONFIG_MEMORY_MODEL_60K
|
||||
|
||||
|
||||
@@ -195,10 +195,10 @@ wedge_dos_directory_display:
|
||||
|
||||
// Display line
|
||||
ldx #<BUF
|
||||
stx basic_current_line_ptr+0
|
||||
stx OLDTXT+0
|
||||
ldx #>BUF
|
||||
stx basic_current_line_ptr+1
|
||||
ldx #basic_current_line_ptr
|
||||
stx OLDTXT+1
|
||||
ldx #OLDTXT
|
||||
jsr list_single_line
|
||||
|
||||
// Read & display next line or quit
|
||||
|
||||
@@ -4,10 +4,8 @@
|
||||
// and ultimate_dos_v1.0.pdf and command_interface_v1.0.pdf by Gideon Zweijtzer
|
||||
|
||||
// Command interface registers
|
||||
.label U64_CONTROL = $DF1C // write
|
||||
.label U64_STATUS = $DF1C // read
|
||||
.label U64_COMMAND_DATA = $DF1D // write
|
||||
.label U64_IDENTIFICATION = $DF1D // read
|
||||
.label U64_CONTROL_STATUS = $DF1C // write = CONTROL, read = STATUS
|
||||
.label U64_COMMAND_DATA_IDENTIFY = $DF1D // write = COMMAND_DATA, read = IDENTIFICATION
|
||||
.label U64_RESPONSE_DATA = $DF1E // read only
|
||||
.label U64_STATUS_DATA = $DF1F // read only
|
||||
|
||||
|
||||
@@ -365,12 +365,12 @@ not_clearscreen:
|
||||
bcc !+
|
||||
|
||||
and #$7f
|
||||
jmp not_high_char
|
||||
jmp output_literal_char // not high char
|
||||
|
||||
!:
|
||||
// Range $20-$3F is unchanged
|
||||
cmp #$40
|
||||
bcc not_high_char
|
||||
bcc output_literal_char // not high char
|
||||
|
||||
// Unshifted letters and symbols from $40-$5F
|
||||
// all end up being -$40
|
||||
@@ -385,16 +385,12 @@ not_clearscreen:
|
||||
|
||||
// Fix shifted chars by adding $20 again
|
||||
cmp #$20
|
||||
bcc not_high_char
|
||||
bcc output_literal_char // not high char
|
||||
cmp #$40
|
||||
bcs not_high_char
|
||||
bcs output_literal_char // not high char
|
||||
clc
|
||||
adc #$20
|
||||
|
||||
not_high_char:
|
||||
|
||||
chrout_l1:
|
||||
|
||||
output_literal_char:
|
||||
|
||||
// Write normal character on the screen
|
||||
@@ -449,7 +445,7 @@ screen_grow_logical_line:
|
||||
// Don't grow line if it is already grown
|
||||
lda LDTBL,y
|
||||
bpl !+
|
||||
jmp done_grow_line
|
||||
jmp not_last_line // doneb grow line
|
||||
!:
|
||||
lda #$80
|
||||
sta LDTBL,y
|
||||
@@ -563,10 +559,9 @@ no_copy_down:
|
||||
dey
|
||||
cpy #40
|
||||
bne !-
|
||||
|
||||
|
||||
rts
|
||||
|
||||
done_grow_line:
|
||||
not_last_line:
|
||||
rts
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
// As there is nothing between here and $FFFA, we can just hard code this in place.
|
||||
|
||||
iobase:
|
||||
// iobase: - commented out to prevent label naming conflict
|
||||
ldy #$DC
|
||||
ldx #$00
|
||||
rts
|
||||
|
||||
+4
-5
@@ -14,14 +14,13 @@ UDTIM:
|
||||
// after this time we have to reset the clock.
|
||||
|
||||
inc TIME+0
|
||||
bne udtim_clock_done
|
||||
bne udtim_update_stkey // done with clock
|
||||
inc TIME+1
|
||||
bne udtim_clock_rollover
|
||||
inc TIME+2
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
udtim_clock_done:
|
||||
udtim_update_stkey: // entry to be used when interrupts are disabled
|
||||
|
||||
// Another action we have to perform is to copy the last row of keyboard to RAM,
|
||||
@@ -44,11 +43,11 @@ udtim_clock_rollover:
|
||||
// At this point TIME+0 contains 0
|
||||
lda TIME+1
|
||||
cmp #$1A
|
||||
bne udtim_clock_done
|
||||
bne udtim_update_stkey // done with clock
|
||||
lda TIME+2
|
||||
cmp #$4F
|
||||
bne udtim_clock_done
|
||||
bne udtim_update_stkey // done with clock
|
||||
lda #$00
|
||||
sta TIME+2
|
||||
sta TIME+1
|
||||
beq udtim_clock_done // will always jump
|
||||
beq udtim_update_stkey // done with clock - will always jump
|
||||
@@ -8,9 +8,9 @@
|
||||
|
||||
install_ram_routines:
|
||||
// Copy routines into place
|
||||
ldx #ram_routines_end-ram_routines_start-1
|
||||
ldx #__ram_routines_end-__ram_routines_start-1
|
||||
!:
|
||||
lda ram_routines_start,x
|
||||
lda __ram_routines_start,x
|
||||
sta tiny_nmi_handler,x
|
||||
dex
|
||||
bpl !-
|
||||
@@ -23,7 +23,7 @@ install_ram_routines:
|
||||
|
||||
rts
|
||||
|
||||
ram_routines_start:
|
||||
__ram_routines_start:
|
||||
|
||||
tiny_nmi_handler_routine:
|
||||
inc missed_nmi_flag
|
||||
@@ -63,6 +63,6 @@ memmap_allram_routine:
|
||||
pla
|
||||
rts
|
||||
|
||||
ram_routines_end:
|
||||
__ram_routines_end:
|
||||
|
||||
#endif // CONFIG_MEMORY_MODEL_60K
|
||||
Reference in new issue
Block a user