size optimization in BASIC, reordered some code to avoid accidental similarities
This commit is contained in:
1 parent
ab7af621d5
commit
3e221903aa
9 files changed
+14
-11
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -127,10 +127,7 @@ got_loadaddress:
|
||||
// or go back to the READY prompt if LOAD was called from direct mode.
|
||||
|
||||
// Reset to start of program
|
||||
lda TXTTAB+0
|
||||
sta OLDTXT+0
|
||||
lda TXTTAB+1
|
||||
sta OLDTXT+1
|
||||
jsr init_oldtxt
|
||||
|
||||
// XXX - should run program if LOAD was used in program mode
|
||||
jmp basic_main_loop
|
||||
@@ -139,10 +136,7 @@ got_loadaddress:
|
||||
basic_relink_program:
|
||||
|
||||
// Start by getting pointer to the first line
|
||||
lda TXTTAB+0
|
||||
sta OLDTXT+0
|
||||
lda TXTTAB+1
|
||||
sta OLDTXT+1
|
||||
jsr init_oldtxt
|
||||
|
||||
basic_relink_loop:
|
||||
// Is the pointer to the end of the program
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
init_oldtxt:
|
||||
|
||||
lda TXTTAB+0
|
||||
sta OLDTXT+0
|
||||
lda TXTTAB+1
|
||||
sta OLDTXT+1
|
||||
|
||||
rts
|
||||
@@ -69,11 +69,11 @@ IOINIT:
|
||||
// XXX: calibrate TOD for both CIA's, see here: https://codebase64.org/doku.php?id=base:efficient_tod_initialisation
|
||||
|
||||
// Enable CIA1 IRQ and ~50Hz timer (https://csdb.dk/forums/?roomid=11&topicid=69037)
|
||||
|
||||
// First disable IRQ generation for both CIA's
|
||||
lda #$7F
|
||||
sta CIA1_ICR // disable all
|
||||
|
||||
// Same for CIA2 - it can generate IRQs too, we definitely don't want this
|
||||
sta CIA2_ICR
|
||||
sta CIA1_ICR
|
||||
|
||||
// Set timer interval to ~1/60th of a second
|
||||
|
||||
|
||||
Reference in new issue
Block a user