From 536ed14b60db0e00f9eb5789fa615764dae9279d Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Thu, 2 Jun 2022 22:15:45 -0700 Subject: [PATCH] RAMDRV: Place new unit number last in DEVLST ProDOS prefers disks sorted with the fastest (e.g. ramdisks) at the end and slowest (e.g. 5.25 floppies) at the start. This facilitates pathname resolution starting at the end of DEVLST, so misses are cheap. --- ram.drv/ram.drv.system.s | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ram.drv/ram.drv.system.s b/ram.drv/ram.drv.system.s index 0f69d20..d17d8db 100644 --- a/ram.drv/ram.drv.system.s +++ b/ram.drv/ram.drv.system.s @@ -341,13 +341,10 @@ copy_driver: dey bpl :- - ;; Shift devices up by one + ;; Otherwise, insert at end. ProDOS resolves names to devices + ;; from last to first, so fast RAM disks should go last. inc DEVCNT ldy DEVCNT -: lda DEVLST-1,y - sta DEVLST,y - dey - bne :- ;; Install device in ProDOS via DEVLST/DEVADR. ;; (Y has index in DEVLST)