Optimize ZP usage

This commit is contained in:
Ben Chong
2017-07-01 19:59:34 -07:00
parent 4347bef9af
commit bce5e371d6
3 changed files with 20 additions and 17 deletions

View File

@@ -9,9 +9,10 @@
MAXCOUNT = 64 MAXCOUNT = 64
HIWATER = 40 HIWATER = 40
LOWATER = 20 LOWATER = 20
inptr = $380 ;$f2
outptr = $381 ;$f3 inptr = $e7 ;$380 ;$f2
charcount = $382 ;$f4 outptr = $e8 ;$381 ;$f3
charcount = $e9 ;$382 ;$f4
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
; Initialize buffer operations ; Initialize buffer operations

View File

@@ -23,13 +23,12 @@ ESC = 27 ; ESC to exit
; as possible. This was needed to debug EhBASIC during the porting process ; as possible. This was needed to debug EhBASIC during the porting process
ysav = $e0 ; 1 byte ysav = $e0 ; 1 byte
rowcount = $e1 ; 1 byte Startaddr = $e1 ; 2 bytes
Startaddr = $e2 ; 2 bytes Startaddr_H = $e2
Startaddr_H = $e3 Hexdigits = $e3 ; 2 bytes
Hexdigits = $e4 ; 2 bytes Hexdigits_H = $e4
Hexdigits_H = $e5 strptr = $e5
strptr = $e6 strptrh = $e6 ; temporary string pointer (not preserved across calls)
strptrh = $e7 ; temporary string pointer (not preserved across calls)
; Local Non-Zero Page Variables ; Local Non-Zero Page Variables
; Unchange from Daryl's code except for addition of the interrupt vectors ; Unchange from Daryl's code except for addition of the interrupt vectors
@@ -43,6 +42,7 @@ SPTR = $03e5 ; hold stack pointer
PREG = $03e6 ; hold status register (P) PREG = $03e6 ; hold status register (P)
irq_vector = $03e8 ; Interrupt vector irq_vector = $03e8 ; Interrupt vector
nmi_vector = $03ea ; NMI vector nmi_vector = $03ea ; NMI vector
rowcount = $03eb ; 1 byte
;realpcl = $03eb ;realpcl = $03eb
;realpch = $03ec ;realpch = $03ec
; ;

View File

@@ -6,16 +6,18 @@
; By Daryl Rictor & Ross Archer Aug 2002 ; By Daryl Rictor & Ross Archer Aug 2002
; ;
temp = $e8 ; save hex value temp = $ea ; save hex value
chksum = $e9 ; record checksum accumulator chksum = $eb ; record checksum accumulator
reclen = $ea ; record length in bytes reclen = $ec ; record length in bytes
dlfail = $eb ; flag for upload failure start_lo = $ed
start_lo = $ec start_hi = $ee
start_hi = $ed rectype = $ef
rectype = $ee
bytecount_l = $f0 bytecount_l = $f0
bytecount_h = $f1 bytecount_h = $f1
dlfail = $03ec ; flag for upload failure
; ;
; ;
;**************************************************** ;****************************************************