mirror of
https://github.com/peterferrie/standard-delivery.git
synced 2024-06-17 05:29:27 +00:00
simplify macros, shave a byte
This commit is contained in:
parent
a5b839d7d0
commit
56dea1dec0
35
fstbt.s
35
fstbt.s
|
@ -11,12 +11,8 @@
|
||||||
!byte 1
|
!byte 1
|
||||||
|
|
||||||
tay ;A is last read sector+1 on entry
|
tay ;A is last read sector+1 on entry
|
||||||
!if enable_banked=1 {
|
!if enable_banked > 0 {
|
||||||
lda $C089 ;bank in ROM while leaving RAM write-enabled if it was before
|
lda $C081 ;bank in ROM
|
||||||
} else {
|
|
||||||
!if enable_banked=2 {
|
|
||||||
lda $C081 ;bank in ROM while leaving RAM write-enabled if it was before
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
;check array before checking sector number
|
;check array before checking sector number
|
||||||
|
@ -63,22 +59,17 @@ setsector
|
||||||
;convert slot to PROM address
|
;convert slot to PROM address
|
||||||
|
|
||||||
txa
|
txa
|
||||||
lsr
|
jsr $F87B ;4xlsr
|
||||||
lsr
|
|
||||||
lsr
|
|
||||||
lsr
|
|
||||||
ora #$C0
|
ora #$C0
|
||||||
pha
|
pha
|
||||||
lda #$5B ;read-1
|
lda #$5B ;read-1
|
||||||
pha
|
pha
|
||||||
!if enable_banked=1 {
|
|
||||||
lda $C08B
|
!if enable_banked > 0 {
|
||||||
lda $C08B ;write-enable RAM and bank it in so read can decode
|
writeenable
|
||||||
} else {
|
lda $C093-(enable_banked*8)
|
||||||
!if enable_banked=2 {
|
lda $C093-(enable_banked*8)
|
||||||
lda $C083
|
;write-enable RAM and bank it in so read can decode
|
||||||
lda $C083 ;write-enable RAM and bank it in so read can decode
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
rts ;return to PROM
|
rts ;return to PROM
|
||||||
|
|
||||||
|
@ -103,12 +94,8 @@ delay
|
||||||
jmp $FCA8 ;common delay for all phases
|
jmp $FCA8 ;common delay for all phases
|
||||||
|
|
||||||
jmpoep
|
jmpoep
|
||||||
!if enable_banked = 1 {
|
!if enable_banked > 0 {
|
||||||
lda $C08B ;bank in our RAM, write-enabled
|
jsr writeenable ;bank in our RAM, write-enabled
|
||||||
} else {
|
|
||||||
!if enable_banked = 2 {
|
|
||||||
lda $C083 ;bank in our RAM, write-enabled
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
jmp $1234 ;arbitrary entry-point to use after read completes
|
jmp $1234 ;arbitrary entry-point to use after read completes
|
||||||
;set to the value that you need
|
;set to the value that you need
|
||||||
|
|
Loading…
Reference in New Issue
Block a user