From: izydorst Date: Fri, 13 Jul 2001 15:58:12 +0000 (+0000) Subject: multidrive support X-Git-Tag: V2.12.0~2789 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=baf977dfd8c72079a8dbf10decc9c280d1f194ef;p=cc65 multidrive support git-svn-id: svn://svn.cc65.org/cc65/trunk@778 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/geos/disk/Makefile b/libsrc/geos/disk/Makefile index da38f9a30..519dc0bfb 100644 --- a/libsrc/geos/disk/Makefile +++ b/libsrc/geos/disk/Makefile @@ -12,7 +12,8 @@ S_OBJS = blkalloc.o calcblksfree.o changediskdevice.o chkdkgeos.o enterturbo.o e nxtblkalloc.o opendisk.o purgeturbo.o putblock.o putdirhead.o readblock.o\ readbuff.o setnextfree.o setgeosdisk.o writeblock.o writebuff.o verwriteblock.o\ gettrse.o\ - dio_openclose.o dio_cts.o dio_stc.o dio_read.o dio_write.o dio_writev.o + dio_openclose.o dio_cts.o dio_stc.o dio_read.o dio_write.o dio_writev.o\ + dio_params.o all: $(S_OBJS) diff --git a/libsrc/geos/disk/dio_params.s b/libsrc/geos/disk/dio_params.s index 77ba92732..8d3d0b3ab 100644 --- a/libsrc/geos/disk/dio_params.s +++ b/libsrc/geos/disk/dio_params.s @@ -3,11 +3,14 @@ ; 2.7.2001 ; ; this function is used by dio_read and dio_write to fix parameters (secnum) -; +; this function calls SetDevice so that more than one drive can be used at once .import popax,pushax,_dio_log_to_phys + .importzp ptr1 .export dio_params,dio_secnum - .include "../inc/geossym.inc" + .include "../inc/geossym.inc" + .include "../inc/jumptab.inc" + .include "../inc/dio.inc" .bss dio_secnum: .res 2 @@ -21,6 +24,17 @@ dio_secnum: .res 2 jsr popax sta dio_secnum stx dio_secnum + + jsr popax ; get 3rd parameter + jsr pushax ; put it back + sta ptr1 + stx ptr1+1 + ldy #sst_driveno + lda (ptr1),y + clc + adc #8 + jsr SetDevice ; setup device, load driver + lda #dio_secnum jsr pushax