migrated code to pragma-like ROM layout definitions
This commit is contained in:
1 parent
435ff6bbc2
commit
63c0404313
326 files changed
+1553
-1840
No files matched your search
@@ -1,9 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
REASON:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
@@ -12,6 +14,3 @@
|
||||
|
||||
CHRNCH:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,9 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and real implementation
|
||||
|
||||
new:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,7 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
// see: https://www.lemon64.com/forum/viewtopic.php?t=64721&sid=bc400a5a6d404f8f092e4d32a92f5de7
|
||||
@@ -6,6 +9,3 @@
|
||||
|
||||
setcharptr:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
@@ -12,6 +14,3 @@
|
||||
|
||||
QPLOP:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
@@ -12,6 +14,3 @@
|
||||
|
||||
GONE:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,9 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
FRMEVL:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
@@ -12,6 +14,3 @@
|
||||
|
||||
EVAL:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
@@ -12,6 +14,3 @@
|
||||
|
||||
ERROR:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,9 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
INIT:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,9 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
RVECT:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Well-known BASIC routine, described in:
|
||||
@@ -90,6 +92,3 @@ linkprg_end_of_line_search:
|
||||
sta OLDTXT+0
|
||||
|
||||
jmp linkprg_loop
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Well-known BASIC routine, described in:
|
||||
//
|
||||
@@ -26,6 +28,3 @@ RUNC:
|
||||
sta TXTPTR+1
|
||||
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Well-known BASIC routine, described in:
|
||||
//
|
||||
@@ -17,6 +19,3 @@ NEWSTT:
|
||||
// For now, lets cheat a little - this should provide some compatibility:
|
||||
|
||||
jmp cmd_run
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Print string at $YYAA
|
||||
// Computes Mapping the 64 p101
|
||||
@@ -33,6 +35,3 @@ STROUT:
|
||||
pla // XXX can we use plx_trash_a here?
|
||||
tax
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,9 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
basic_adray1:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,9 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
basic_adray2:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Delete the current BASIC line, which is assumed to have already
|
||||
// been found with basic_find_line.
|
||||
@@ -82,6 +84,3 @@ basic_delete_line:
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Computes Mapping the 64 p93
|
||||
|
||||
@@ -31,6 +33,3 @@ basic_do_error:
|
||||
ldx #$FE
|
||||
txs
|
||||
jmp basic_main_loop
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Jump back into the BASIC execute line loop
|
||||
// after first checking that we have a colon
|
||||
@@ -367,6 +369,3 @@ basic_command_jump_table:
|
||||
.word cmd_unimplemented-1
|
||||
.word cmd_unimplemented-1
|
||||
.word cmd_unimplemented-1
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,7 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Find the BASIC line with number LINNUM
|
||||
|
||||
@@ -81,6 +84,3 @@ more_lines_exist:
|
||||
sta OLDTXT+0
|
||||
|
||||
jmp basic_find_line_loop
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Advance OLDTXT by following the
|
||||
// link to the next line
|
||||
@@ -27,6 +29,3 @@ basic_find_next_line:
|
||||
pla
|
||||
sta OLDTXT+0
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,5 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
basic_follow_link_to_next_line:
|
||||
ldy #0
|
||||
@@ -24,6 +25,3 @@ basic_follow_link_to_next_line:
|
||||
pla
|
||||
sta OLDTXT+0
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Insert the tokenised line stored at $0200.
|
||||
// First work out where in the list to put it
|
||||
@@ -100,6 +102,3 @@ line_store_loop:
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
basic_main_loop:
|
||||
@@ -176,6 +178,3 @@ not_a_line:
|
||||
sta CURLIN+1
|
||||
|
||||
jmp basic_execute_statement
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
basic_parse_line_number:
|
||||
@@ -27,6 +29,3 @@ ml_bad_line_number:
|
||||
sta LINNUM+1
|
||||
clc
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
basic_shift_mem_down_and_relink:
|
||||
@@ -171,6 +173,3 @@ relink_down_loop:
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
basic_shift_mem_up_and_relink:
|
||||
@@ -203,6 +205,3 @@ relink_up_loop:
|
||||
bcs relink_up_next_line
|
||||
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Default values for BASIC vectors - described in:
|
||||
@@ -20,6 +22,3 @@ basic_vector_defaults_2:
|
||||
|
||||
.word basic_adray1 // ADRAY1
|
||||
.word basic_adray2 // ADRAY2
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Well-known BASIC routine, described in:
|
||||
@@ -11,6 +13,3 @@ LINPRT:
|
||||
// XXX This is temporary, to allow some software to work!
|
||||
// To be replaced by real impleementation.
|
||||
jmp print_integer
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Skip the gap between $C000-$DFFF
|
||||
|
||||
.fill $2000, $00
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
cmd_stop:
|
||||
@@ -23,6 +25,3 @@ cmd_stop:
|
||||
|
||||
cmd_end:
|
||||
jmp basic_main_loop
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,7 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// LIST basic text.
|
||||
// XXX - Does not currently support line number ranges
|
||||
@@ -147,6 +150,3 @@ list_is_literal:
|
||||
list_end_of_line:
|
||||
// Print end of line
|
||||
jmp print_return
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
cmd_load:
|
||||
@@ -129,6 +131,3 @@ load_no_error:
|
||||
|
||||
// XXX - should run program if LOAD was used in program mode
|
||||
jmp basic_main_loop
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
cmd_new:
|
||||
@@ -80,6 +82,3 @@ basic_do_clr:
|
||||
sta STREND+1
|
||||
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,9 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// REM statement just skips to the next line
|
||||
|
||||
cmd_rem:
|
||||
jmp basic_end_of_line
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
cmd_run:
|
||||
@@ -23,6 +25,3 @@ cmd_goto:
|
||||
!:
|
||||
// Run it!
|
||||
jmp basic_execute_from_current_line
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
cmd_sys:
|
||||
@@ -69,6 +71,3 @@ cmd_sys_setup_call:
|
||||
|
||||
cmd_sys_hack_str:
|
||||
.byte $FF, $AC, $36, $35, $36, $00
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Default handler for all not-yet-implemented commands
|
||||
@@ -156,6 +158,3 @@ cmd_go:
|
||||
cmd_unimplemented:
|
||||
|
||||
jmp do_NOT_IMPLEMENTED_error
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,6 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// As many errors are triggered from many places in the BASIC
|
||||
// As many errors are triggered from many places in the BASIC
|
||||
// interprettor, it is important to have an efficicent means of
|
||||
// calling them.
|
||||
// LDX #$nn / jmp do_basic_error
|
||||
@@ -167,6 +169,3 @@ do_basic_error:
|
||||
// XXX - Restore stack depth first?
|
||||
|
||||
jmp basic_main_loop
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Multiply Floating Point Accumulator by 10
|
||||
// = 8x + 2x
|
||||
@@ -97,6 +99,3 @@ f1md2_l1:
|
||||
dey
|
||||
bpl f1md2_l1
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Computes Mapping the C64 p88
|
||||
|
||||
.word basic_cold_start
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Computes Mapping the C64 p88
|
||||
|
||||
.word basic_warm_start
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Continuation of the BASIC cold start routine
|
||||
@@ -41,6 +43,3 @@ basic_cold_start_internal:
|
||||
|
||||
// jump into warm start loop
|
||||
jmp basic_warm_start
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Continuation of the BASIC cold start routine
|
||||
@@ -28,6 +30,3 @@ basic_warm_start_real:
|
||||
|
||||
!:
|
||||
jmp basic_main_loop
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// BASIC Cold start entry point
|
||||
@@ -23,6 +25,3 @@ basic_cold_start:
|
||||
// Remaining part would not fit here
|
||||
|
||||
jmp basic_cold_start_internal
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,10 +1,10 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Clear screen etc, show READY prompt.
|
||||
|
||||
basic_warm_start:
|
||||
|
||||
jmp basic_warm_start_real
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Well-known BASIC routine, described in:
|
||||
@@ -10,6 +12,3 @@
|
||||
|
||||
INITMSG:
|
||||
jmp initmsg_real
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Print out the amount of free bytes - for the startup banner
|
||||
@@ -20,6 +22,3 @@ initmsg_bytes_free:
|
||||
// Print rest of the start up message
|
||||
ldx #34
|
||||
jmp print_packed_message
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,7 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Routine is too long to fit in the original location
|
||||
|
||||
@@ -151,6 +154,3 @@ initmsg_real:
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Startup banner, to be displayed during cold start
|
||||
@@ -111,6 +113,3 @@ pre_revision_string:
|
||||
// .byte $0D,$05,$92,$00
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
init_oldtxt:
|
||||
@@ -9,6 +11,3 @@ init_oldtxt:
|
||||
sta OLDTXT+1
|
||||
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Consummes a comma in a BASIC code, C set for no coma found
|
||||
@@ -19,6 +21,3 @@ injest_comma:
|
||||
injest_comma_found:
|
||||
clc
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Parse a number from the input buffer at (TXTPTR)
|
||||
@@ -152,6 +154,3 @@ erase_fac1:
|
||||
sta FACOV
|
||||
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Pack a word using the simple compression scheme.
|
||||
// This has to be the same implementation as in compress_text.c
|
||||
@@ -255,6 +257,3 @@ not_a_match:
|
||||
// Not a char that we can pack, so return 0
|
||||
lda #$00
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Return C=1 if a pointer in BASIC memory space is NULL, else C=0
|
||||
// X = ZP pointer to check
|
||||
@@ -34,6 +36,3 @@ peek_line_pointer_null_check:
|
||||
ptr_not_null:
|
||||
sec
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Works similar to $BDCD in original C64 BASIC
|
||||
// XXX Should eventually get replaced by a more flexible and optimal routine.
|
||||
@@ -144,6 +146,3 @@ number_table_hi:
|
||||
.byte 0,8,1,9,2
|
||||
.byte 1,6,3,8,4
|
||||
.byte 3,2,7,6,8
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// This routine prints messages that have been packed
|
||||
// using the make_error_tables program.
|
||||
@@ -228,6 +230,3 @@ is_uncommon_char:
|
||||
phy_trash_a
|
||||
|
||||
jmp has_nybl
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
ready_message:
|
||||
@@ -6,6 +8,3 @@ ready_message:
|
||||
// information.
|
||||
ldx #29
|
||||
jmp print_packed_message
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,10 +1,10 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Computes Mapping the 64, p89
|
||||
// 8 character name
|
||||
// MEGABAS2 = "MEGA BASIC 2"
|
||||
|
||||
.byte $4D,$45,$47,$41,$42,$41,$53,$32
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// !!! PROPOSAL ONLY !!! PROPOSAL ONLY !!! NOT FOR USING EXTERNALLY YET !!!
|
||||
@@ -31,6 +33,3 @@ rom_revision_basic_string:
|
||||
.byte $00 // marks the end of string
|
||||
|
||||
__rom_revision_basic_end:
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// !!! PROPOSAL ONLY !!! PROPOSAL ONLY !!! NOT FOR USING EXTERNALLY YET !!!
|
||||
@@ -45,6 +47,3 @@ rom_revision_kernal_string:
|
||||
.byte $00 // marks the end of string
|
||||
|
||||
__rom_revision_kernal_end:
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
select_device:
|
||||
@@ -17,6 +19,3 @@ select_device:
|
||||
ldx #$08
|
||||
!:
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Tokenise a line of BASIC
|
||||
// Stored at $0200
|
||||
@@ -268,6 +270,3 @@ done_searching_for_token:
|
||||
sec
|
||||
lda #$00
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// IMPORTANT:
|
||||
// These routines lengths cannot be changed without changing
|
||||
@@ -154,6 +156,3 @@ smd1:
|
||||
rts
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
#if CONFIG_DOS_WEDGE
|
||||
@@ -258,6 +260,3 @@ wedge_dos_setnam:
|
||||
jmp JSETNAM
|
||||
|
||||
#endif // CONFIG_DOS_WEDGE
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_BASIC_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
#if CONFIG_TAPE_WEDGE
|
||||
@@ -34,6 +36,3 @@ wedge_tape:
|
||||
|
||||
|
||||
#endif // CONFIG_TAPE_WEDGE
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// LOAD routine hook for fast loading via UltiDOS
|
||||
@@ -130,6 +132,3 @@ u64_load_check_status_ok:
|
||||
jmp !-
|
||||
!:
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Screen CHROUT
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Insert line at top of screen
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// IEC close
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
+3
-4
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Kernal error codes are described in 'Commodore 64 Programmers Reference Guide', page 306
|
||||
@@ -91,6 +93,3 @@ kernalstatus_DEVICE_NOT_FOUND:
|
||||
ora #K_STS_DEVICE_NOT_FOUND
|
||||
sta IOSTATUS
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -29,6 +31,3 @@ ACPTR:
|
||||
#else
|
||||
jmp kernalerror_ILLEGAL_DEVICE_NUMBER
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// IEC part of the CHKIN routine
|
||||
@@ -30,6 +32,3 @@ chkin_iec:
|
||||
jmp chkin_set_device
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// IEC part of the CHRIN routine
|
||||
@@ -9,6 +11,3 @@ chrin_iec:
|
||||
|
||||
// XXX is this really all?
|
||||
jmp JACPTR
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// IEC part of the CHROUT routine
|
||||
@@ -11,6 +13,3 @@ chrout_iec:
|
||||
jsr JCIOUT
|
||||
bcc_16 chrout_done_success
|
||||
jmp chrout_done_fail
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -48,6 +50,3 @@ ciout_send_byte:
|
||||
rts
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// IEC part of the CKOUT routine
|
||||
@@ -30,6 +32,3 @@ ckout_iec:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// IEC part of the CLOSE routine
|
||||
@@ -34,6 +36,3 @@ close_iec_end:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// IEC part of the CLRCHN routine
|
||||
@@ -29,6 +31,3 @@ clrchn_iec:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Checks whether device number (in .A) is a correct IEC device number
|
||||
@@ -32,6 +34,3 @@ iec_check_devnum_failed:
|
||||
rts
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Common part of CLOSE and LOAD/SAVE routines for IEC
|
||||
@@ -30,6 +32,3 @@ iec_close_load:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Kernal internal IEC routine
|
||||
@@ -22,6 +24,3 @@ iec_cmd_close:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Kernal internal IEC routine
|
||||
@@ -67,6 +69,3 @@ iec_check_channel_openclose:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,89 +1,88 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
//
|
||||
// Helper IEC routines to pull/release certain lines
|
||||
//
|
||||
// Order of operation is set for extra robustness, on non-emulated hardware
|
||||
// lines might need few cycles to stabilize (released CLK = DATA considered valid),
|
||||
// see page 10 of http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
|
||||
//
|
||||
|
||||
|
||||
|
||||
#if CONFIG_IEC
|
||||
|
||||
|
||||
iec_pull_atn_clk_release_data:
|
||||
|
||||
lda CIA2_PRA
|
||||
ora #BIT_CIA2_PRA_ATN_OUT // pull
|
||||
sta CIA2_PRA
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
iec_pull_clk_release_data:
|
||||
|
||||
lda CIA2_PRA
|
||||
ora #BIT_CIA2_PRA_CLK_OUT // pull
|
||||
sta CIA2_PRA
|
||||
!:
|
||||
and #$FF - BIT_CIA2_PRA_DAT_OUT // release
|
||||
bne iec_pull_release_end // branch always
|
||||
|
||||
iec_pull_clk_release_data_oneshot:
|
||||
|
||||
lda CIA2_PRA
|
||||
ora #BIT_CIA2_PRA_CLK_OUT // pull
|
||||
bne !- // branch always
|
||||
|
||||
iec_release_atn_clk_data:
|
||||
|
||||
lda CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_ATN_OUT // release
|
||||
sta CIA2_PRA
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
iec_release_clk_data:
|
||||
|
||||
lda CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_DAT_OUT // release
|
||||
sta CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_CLK_OUT // release
|
||||
jmp iec_pull_release_end
|
||||
|
||||
iec_release_clk_pull_data:
|
||||
|
||||
lda CIA2_PRA
|
||||
ora #BIT_CIA2_PRA_DAT_OUT // pull
|
||||
sta CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_CLK_OUT // release
|
||||
bne iec_pull_release_end // branch always
|
||||
|
||||
iec_pull_data_release_atn_clk:
|
||||
|
||||
lda CIA2_PRA
|
||||
ora #BIT_CIA2_PRA_DAT_OUT // pull
|
||||
sta CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_CLK_OUT // release
|
||||
sta CIA2_PRA
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
iec_release_atn:
|
||||
|
||||
lda CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_ATN_OUT // release
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
iec_pull_release_end:
|
||||
|
||||
sta CIA2_PRA
|
||||
rts
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Helper IEC routines to pull/release certain lines
|
||||
//
|
||||
// Order of operation is set for extra robustness, on non-emulated hardware
|
||||
// lines might need few cycles to stabilize (released CLK = DATA considered valid),
|
||||
// see page 10 of http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
|
||||
//
|
||||
|
||||
|
||||
|
||||
#if CONFIG_IEC
|
||||
|
||||
|
||||
iec_pull_atn_clk_release_data:
|
||||
|
||||
lda CIA2_PRA
|
||||
ora #BIT_CIA2_PRA_ATN_OUT // pull
|
||||
sta CIA2_PRA
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
iec_pull_clk_release_data:
|
||||
|
||||
lda CIA2_PRA
|
||||
ora #BIT_CIA2_PRA_CLK_OUT // pull
|
||||
sta CIA2_PRA
|
||||
!:
|
||||
and #$FF - BIT_CIA2_PRA_DAT_OUT // release
|
||||
bne iec_pull_release_end // branch always
|
||||
|
||||
iec_pull_clk_release_data_oneshot:
|
||||
|
||||
lda CIA2_PRA
|
||||
ora #BIT_CIA2_PRA_CLK_OUT // pull
|
||||
bne !- // branch always
|
||||
|
||||
iec_release_atn_clk_data:
|
||||
|
||||
lda CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_ATN_OUT // release
|
||||
sta CIA2_PRA
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
iec_release_clk_data:
|
||||
|
||||
lda CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_DAT_OUT // release
|
||||
sta CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_CLK_OUT // release
|
||||
jmp iec_pull_release_end
|
||||
|
||||
iec_release_clk_pull_data:
|
||||
|
||||
lda CIA2_PRA
|
||||
ora #BIT_CIA2_PRA_DAT_OUT // pull
|
||||
sta CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_CLK_OUT // release
|
||||
bne iec_pull_release_end // branch always
|
||||
|
||||
iec_pull_data_release_atn_clk:
|
||||
|
||||
lda CIA2_PRA
|
||||
ora #BIT_CIA2_PRA_DAT_OUT // pull
|
||||
sta CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_CLK_OUT // release
|
||||
sta CIA2_PRA
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
iec_release_atn:
|
||||
|
||||
lda CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_ATN_OUT // release
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
iec_pull_release_end:
|
||||
|
||||
sta CIA2_PRA
|
||||
rts
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Helper routines to return with error/success
|
||||
@@ -40,6 +42,3 @@ iec_return_DEVICE_NOT_FOUND:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Receive a byte from the IEC bus.
|
||||
// Implemented based on https://www.pagetable.com/?p=1135, https://github.com/mist64/cbmbus_doc,
|
||||
@@ -157,6 +159,3 @@ iec_rx_end:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Helper routine to check for EOI while receiving byte from IEC
|
||||
@@ -40,6 +42,3 @@ iec_rx_check_eoi_done:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Sends file (stream) name to IEC device
|
||||
@@ -43,6 +45,3 @@ iec_send_file_name_done:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
#if CONFIG_IEC
|
||||
@@ -13,6 +15,3 @@ iec_set_idle:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// According to http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
|
||||
// pages 7--8.
|
||||
@@ -41,6 +43,3 @@ iec_turnaround_to_listen:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// According to http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
|
||||
// pages 7--8.
|
||||
@@ -33,6 +35,3 @@ iec_turnaround_to_talk:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Implemented based on https://www.pagetable.com/?p=1135, https://github.com/mist64/cbmbus_doc
|
||||
|
||||
@@ -162,6 +164,3 @@ iec_tx_common_finalize:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Implemented based on https://www.pagetable.com/?p=1135, https://github.com/mist64/cbmbus_doc
|
||||
|
||||
@@ -42,6 +44,3 @@ iec_tx_command:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,5 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Routine to finalize some IEC commands - which do not end in turnaround and are not followed by others
|
||||
// Implemented based on https://www.pagetable.com/?p=1135, https://github.com/mist64/cbmbus_doc
|
||||
@@ -24,6 +25,3 @@ iec_tx_command_finalize:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
Loaded 100 of 326 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user