string allocation routine complete, dealloc and garbage collection still to do
This commit is contained in:
1 parent
940470e84d
commit
116c6734e6
2 files changed
+68
-33
No files matched your search
@@ -0,0 +1,31 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Helper routines for 'varstr_alloc'
|
||||
//
|
||||
|
||||
varstr_FRETOP_down: // .A - bytes to lower FRETOP, uses memmove__tmp
|
||||
|
||||
sta memmove__tmp
|
||||
|
||||
sec
|
||||
lda FRETOP+0
|
||||
sbc memmove__tmp
|
||||
sta FRETOP+0
|
||||
bcs !+
|
||||
dec FRETOP+1
|
||||
!:
|
||||
// FALLTROUGH
|
||||
|
||||
varstr_FRETOP_check: // check if FRETOP > STREND, Carry set if not
|
||||
|
||||
lda STREND+1
|
||||
cmp FRETOP+1
|
||||
beq !+
|
||||
rts
|
||||
!:
|
||||
lda STREND+0
|
||||
cmp FRETOP+0
|
||||
rts
|
||||
Reference in new issue
Block a user