some code/data size optimizations
This commit is contained in:
1 parent
c8d255130c
commit
ede880853e
3 files changed
+9
-10
No files matched your search
@@ -54,7 +54,7 @@
|
|||||||
!addr M65_TXTROW_OFF = $592 ; $592-$593 offset to the current text row from the viewport start
|
!addr M65_TXTROW_OFF = $592 ; $592-$593 offset to the current text row from the viewport start
|
||||||
!addr M65_SCRCOLMAX = $594 ; maximum allowed column
|
!addr M65_SCRCOLMAX = $594 ; maximum allowed column
|
||||||
; $595-$5EB -- UNUSED --
|
; $595-$5EB -- UNUSED --
|
||||||
!addr M65_DMAGIC_LIST = $5EF ; $5EF-$5FF reserved for DMAgic list, 17 bytes
|
!addr M65_DMAGIC_LIST = $5F1 ; $5EF-$5FF reserved for DMAgic list, 15 bytes (modulo bytes are not needed)
|
||||||
!addr M65_RS232_INBUF = $600 ; $600-$6FF -- reserved for RS-232 input buffer --
|
!addr M65_RS232_INBUF = $600 ; $600-$6FF -- reserved for RS-232 input buffer --
|
||||||
!addr M65_RS232_OUTBUF = $700 ; $700-$7FF -- reserved for RS-232 output buffer --
|
!addr M65_RS232_OUTBUF = $700 ; $700-$7FF -- reserved for RS-232 output buffer --
|
||||||
|
|
||||||
|
|||||||
@@ -14,9 +14,8 @@ helper_cmp_fretop:
|
|||||||
|
|
||||||
lda DSCPNT+2
|
lda DSCPNT+2
|
||||||
cmp FRETOP+1
|
cmp FRETOP+1
|
||||||
beq @1 ; XXX! BNE+RTS would save one byte
|
bne @1
|
||||||
rts
|
|
||||||
@1:
|
|
||||||
lda DSCPNT+1
|
lda DSCPNT+1
|
||||||
cmp FRETOP+0
|
cmp FRETOP+0
|
||||||
|
@1:
|
||||||
rts
|
rts
|
||||||
@@ -22,10 +22,12 @@ m65_dmagic_oper_fill:
|
|||||||
|
|
||||||
; Set operation type
|
; Set operation type
|
||||||
|
|
||||||
lda #($03 + $08) ; operation: FILL + allow interrupts
|
lda #$03 ; operation: FILL
|
||||||
sta M65_DMAGIC_LIST+6
|
sta M65_DMAGIC_LIST+6
|
||||||
|
|
||||||
; XXX! put 0 into M65_DMAJOB_SRC_3 to clear the flags
|
; Put this into M65_DMAJOB_SRC_3 too - to make sure flags (4 most significant bits) are cleared
|
||||||
|
|
||||||
|
sta M65_DMAJOB_SRC_3
|
||||||
|
|
||||||
; Adapt the addresses, launch the job
|
; Adapt the addresses, launch the job
|
||||||
|
|
||||||
@@ -42,7 +44,7 @@ m65_dmagic_oper_copy:
|
|||||||
|
|
||||||
; Set operation type
|
; Set operation type
|
||||||
|
|
||||||
lda #($00 + $08) ; operation: COPY + allow interrupts
|
lda #$00 ; operation: COPY
|
||||||
sta M65_DMAGIC_LIST+6
|
sta M65_DMAGIC_LIST+6
|
||||||
|
|
||||||
; Adapt the addresses, launch the job
|
; Adapt the addresses, launch the job
|
||||||
@@ -135,8 +137,6 @@ m65_dmagic_init:
|
|||||||
lda #$00
|
lda #$00
|
||||||
sta M65_DMAGIC_LIST+5 ; <- end of options
|
sta M65_DMAGIC_LIST+5 ; <- end of options
|
||||||
|
|
||||||
; !XXX modulo is ignored - remove these, shift M65_DMAGIC_LIST up by 2 bytes
|
; Modulo is never used - thus our list is 15 bytes, not 17
|
||||||
sta M65_DMAGIC_LIST+15 ; <- set modulo to 0
|
|
||||||
sta M65_DMAGIC_LIST+16
|
|
||||||
|
|
||||||
rts
|
rts
|
||||||
Reference in new issue
Block a user