load installer over loader to free page 8

This commit is contained in:
Peter Ferrie 2016-11-16 22:53:50 -08:00
parent 282d890abd
commit 829b9ae9f5

View File

@ -67,7 +67,7 @@
WIDTH = 40 WIDTH = 40
HEIGHT = 24 HEIGHT = 24
LDRBASE = $2d9 LDRBASE = $2d9
INSTALLBUFFER = $800 ; max 256 bytes, not preserved INSTALLBUFFER = $249 ; yes, the overlay overwrites the loader...
SWAPBUFFER = $900 ; (LoadSaveEnd - LoadSaveStart) size SWAPBUFFER = $900 ; (LoadSaveEnd - LoadSaveStart) size
; needed by DiversiDOS, must be page-aligned ; needed by DiversiDOS, must be page-aligned
; region is preserved across calls ; region is preserved across calls
@ -76,9 +76,8 @@
LdrHeader LdrHeader
!word LDRBASE, LdrEnd - LdrStart !word LDRBASE, LdrEnd - LdrStart
;main loader routine loads discardable install code to $800, ;loader loads to pages 2-3, loads discardable install code also to pages 2-3
;since DOS startup will clobber this page anyway ;and carries proxy routines including file manager and banked RAM exchange for DiversiDOS
;also carries proxy routines including file manager and banked RAM exchange for DiversiDOS
LdrStart LdrStart
;set filename pointer in MLI request packet ;set filename pointer in MLI request packet
@ -298,8 +297,8 @@ ExchangeSwapSet
bpl - bpl -
rts rts
LdrEnd LdrEnd
!if ((LDRBASE + LdrEnd - LdrStart) > $3d0) { !if ((LDRBASE + LdrEnd - LdrStart) > $3D0) {
!error "swap code too large, ends at ",LDRBASE + LdrEnd - LdrStart !error "swap code too large, ", (LDRBASE + LdrEnd - LdrStart) - $3D0, " bytes too many"
} }
;install routine is an overlay that is loaded by loader routine above ;install routine is an overlay that is loaded by loader routine above
@ -417,7 +416,7 @@ _WelcomeMessage
} }
InstallEnd InstallEnd
!if >(InstallEnd - InstallStart) { !if >(InstallEnd - InstallStart) {
!error "swap code too large, ends at ",INSTALLBUFFER + InstallEnd - InstallStart !error "swap code too large, ends at ", (InstallEnd - InstallStart) - $100, " bytes too many"
} }
;editor code is an overlay that is loaded by install routine above ;editor code is an overlay that is loaded by install routine above