move SaveProDOS to wrapper to shave some bytes

This commit is contained in:
4am 2021-04-19 10:38:28 -04:00
parent 3beb4c8b3d
commit 4a97d929eb
3 changed files with 6 additions and 23 deletions

View File

@ -8,7 +8,7 @@
; 0B00..0BFF - used by RAM disk
; 0C00..0CFF - clobbered by Special Delivery tracer
; 0D00..0EFF - unused
; 0F00..0FFF - backup of page $BF (SaveProDOS, SwapProDOS)
; 0F00..0FFF - backup of page $BF (SwapProDOS)
; 1000..1FFF - data buffer for current track
; 2000..35FF - clobbered by Special Delivery tracer
; 3600..3FFF - clobbered by lomem DOS 3.3 / Special Delivery tracers
@ -17,25 +17,6 @@
;-------------------------------
;-------------------------------
; SaveProDOS
; saves memory pages used by ProDOS
; pages $BF
; in: none
; out: all flags and registers preserved
;-------------------------------
!zone {
SaveProDOS
php
pha
lda #$BF
ldx #$0F
ldy #$01
jsr CopyMemory
pla
plp
rts
;-------------------------------
; SwapProDOS
; saves/restores memory pages used by ProDOS
@ -218,4 +199,3 @@ ReorderLogicalToPhysical
iny
bne -
rts
}

View File

@ -868,7 +868,6 @@ LastMover
!warn "CleanExit=",CleanExit
!warn "WaitForKey=",WaitForKey
!warn "SaveProDOS=",SaveProDOS
!warn "OpenFile=",OpenFile
!warn "ReadFile=",ReadFile
!warn "CloseFile=",CloseFile

View File

@ -21,7 +21,11 @@ good_mem
sty $fe ;;zp_dest_lo
OneTimeSetup
jsr SaveProDOS ; save a copy of ProDOS system global page
ldy #0 ; save a copy of ProDOS system global page
- lda $BF00, y ; (will be copied back and forth by SwapProDOS later)
sta $0F00, y
iny
bne -
lda $FBB3 ; ROM MachineID
cmp #$EA ; ][+?
bne +