small cleanup in BASIC
This commit is contained in:
1 parent
580cd65941
commit
0436b5c62e
13 files changed
+319
-278
No files matched your search
@@ -0,0 +1,41 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Check for end of statement, sets Carry if so. Injests all spaces.
|
||||
//
|
||||
|
||||
|
||||
end_of_statement_check:
|
||||
|
||||
ldy #0
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<TXTPTR
|
||||
jsr peek_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (TXTPTR),y
|
||||
#endif
|
||||
|
||||
// Injest any spaces
|
||||
|
||||
cmp #$20
|
||||
bne !+
|
||||
jsr basic_consume_character
|
||||
jmp end_of_statement_check
|
||||
!:
|
||||
cmp #$00
|
||||
beq !+
|
||||
cmp #$3a
|
||||
beq !+
|
||||
|
||||
// Not end of statement
|
||||
|
||||
clc
|
||||
rts
|
||||
!:
|
||||
// End of statement
|
||||
|
||||
sec
|
||||
rts
|
||||
Reference in new issue
Block a user