more work on string support
This commit is contained in:
1 parent
127b71f67f
commit
159acfba2f
7 files changed
+133
-73
No files matched your search
@@ -15,11 +15,10 @@
|
||||
// - https://sites.google.com/site/h2obsession/CBM/basic/variable-format
|
||||
//
|
||||
// Input:
|
||||
// - DSCPNT+0, DSCPNT+1 - pointer to string descriptor, first pointed byte should contain desired length
|
||||
// - DSCPNT+1, DSCPNT+2 - pointer to string descriptor, first pointed byte should contain desired length
|
||||
//
|
||||
|
||||
// XXX test this routine
|
||||
// XXX change DSCPNT to use standard descriptor format
|
||||
|
||||
varstr_alloc:
|
||||
|
||||
@@ -61,7 +60,7 @@ varstr_alloc_retry:
|
||||
// Create the back-pointer to the string descriptor
|
||||
|
||||
ldy #$00
|
||||
lda DSCPNT+0
|
||||
lda DSCPNT+1
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<FRETOP
|
||||
@@ -71,7 +70,7 @@ varstr_alloc_retry:
|
||||
#endif
|
||||
|
||||
iny
|
||||
lda DSCPNT+1
|
||||
lda DSCPNT+2
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
jsr poke_under_roms
|
||||
@@ -84,12 +83,12 @@ varstr_alloc_retry:
|
||||
dey // $01 -> $00
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<DSCPNT
|
||||
ldx #<DSCPNT+1
|
||||
jsr peek_under_roms
|
||||
#elif CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
|
||||
jsr peek_under_roms_via_DSCPNT
|
||||
jsr peek_under_roms_via_DSCPNT_PLUS_1
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (DSCPNT),y
|
||||
lda (DSCPNT+1),y
|
||||
#endif
|
||||
|
||||
jsr varstr_FRETOP_down_A
|
||||
@@ -101,7 +100,7 @@ varstr_alloc_retry:
|
||||
lda FRETOP+0
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<DSCPNT
|
||||
ldx #<FRETOP
|
||||
jsr poke_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K || CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
|
||||
sta (FRETOP), y
|
||||
@@ -111,9 +110,10 @@ varstr_alloc_retry:
|
||||
lda FRETOP+1
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<DSCPNT+1
|
||||
jsr poke_under_roms
|
||||
#else // CONFIG_MEMORY_MODEL_38K || CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
|
||||
sta (DSCPNT), y
|
||||
sta (DSCPNT+1), y
|
||||
#endif
|
||||
|
||||
// The end
|
||||
|
||||
Reference in new issue
Block a user