several features are now optional, added legacy BASIC memory model

This commit is contained in:
FeralChild64 committed 2019-09-11 19:21:02 +02:00
1 parent 49e8b75b85
commit ed51a62f32
30 files changed
+555 -72

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
// Return C=1 if a pointer in BASIC memory space is NULL, else C=0
// X = ZP pointer to check
peek_line_pointer_null_check:
ldy #$00
#if CONFIG_MEMORY_MODEL_60K
ldx #<basic_current_line_ptr+0
jsr peek_under_roms
cmp #$00
#else // CONFIG_MEMORY_MODEL_38K
lda (basic_current_line_ptr),y
#endif
bne ptr_not_null
iny
#if CONFIG_MEMORY_MODEL_60K
jsr peek_under_roms
cmp #$00
#else // CONFIG_MEMORY_MODEL_38K
lda (basic_current_line_ptr),y
#endif
bne ptr_not_null
// Pointer is NULL
clc
rts
ptr_not_null:
sec
rts