From: ol.sc
Date: Sat, 4 Feb 2012 21:46:26 +0000 (+0000)
Subject: Moved the 'disk' files from 'geos-cbm' to 'geos-common' which are believed to work...
X-Git-Tag: V2.13.3~18
X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=10374c66cedd8498b040beaa329fa45094b9acf5;p=cc65
Moved the 'disk' files from 'geos-cbm' to 'geos-common' which are believed to work as-is on Apple GEOS too.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5447 b7a2c559-68d2-44c3-8de9-860c34a00d81
---
diff --git a/libsrc/geos-cbm/disk/Makefile b/libsrc/geos-cbm/disk/Makefile
index f1d3f329c..26b70fcfd 100644
--- a/libsrc/geos-cbm/disk/Makefile
+++ b/libsrc/geos-cbm/disk/Makefile
@@ -5,9 +5,7 @@
#--------------------------------------------------------------------------
# Object files
-S_OBJS += blkalloc.o \
- calcblksfree.o \
- changediskdevice.o \
+S_OBJS += changediskdevice.o \
chkdkgeos.o \
dio_openclose.o \
dio_cts.o \
@@ -19,22 +17,11 @@ S_OBJS += blkalloc.o \
enterturbo.o \
exitturbo.o \
findbambit.o \
- freeblock.o \
- getblock.o \
- getdirhead.o \
- getptrcurdknm.o \
- gettrse.o \
newdisk.o \
- nxtblkalloc.o \
- opendisk.o \
purgeturbo.o \
- putblock.o \
- putdirhead.o \
readblock.o \
readbuff.o \
- setnextfree.o \
setgeosdisk.o \
- setoserror.o \
writeblock.o \
writebuff.o \
verwriteblock.o
diff --git a/libsrc/geos-cbm/disk/blkalloc.s b/libsrc/geos-cbm/disk/blkalloc.s
deleted file mode 100644
index 15f5a519a..000000000
--- a/libsrc/geos-cbm/disk/blkalloc.s
+++ /dev/null
@@ -1,22 +0,0 @@
-
-;
-; Maciej 'YTM/Elysium' Witkowiak
-;
-; 21.12.1999, 2.1.2003
-
-; char BlkAlloc (struct tr_se output[], int length);
-
- .import popax, setoserror
- .export _BlkAlloc
-
- .include "jumptab.inc"
- .include "geossym.inc"
-
-_BlkAlloc:
- sta r2L
- stx r2H
- jsr popax
- sta r4L
- stx r4H
- jsr BlkAlloc
- jmp setoserror
diff --git a/libsrc/geos-cbm/disk/calcblksfree.s b/libsrc/geos-cbm/disk/calcblksfree.s
deleted file mode 100644
index ec66d9fc9..000000000
--- a/libsrc/geos-cbm/disk/calcblksfree.s
+++ /dev/null
@@ -1,20 +0,0 @@
-
-;
-; Maciej 'YTM/Alliance' Witkowiak
-;
-; 21.12.99
-
-; int CalcBlksFree (void);
-
- .import __oserror
- .export _CalcBlksFree
-
- .include "jumptab.inc"
- .include "geossym.inc"
-
-_CalcBlksFree:
- jsr CalcBlksFree
- stx __oserror
- lda r4L
- ldx r4H
- rts
diff --git a/libsrc/geos-cbm/disk/freeblock.s b/libsrc/geos-cbm/disk/freeblock.s
deleted file mode 100644
index 5010d6778..000000000
--- a/libsrc/geos-cbm/disk/freeblock.s
+++ /dev/null
@@ -1,20 +0,0 @@
-
-;
-; Maciej 'YTM/Elysium' Witkowiak
-;
-; 21.12.1999, 2.1.2003
-
-; char FreeBlock (struct tr_se *TS);
-
- .import gettrse, setoserror
- .export _FreeBlock
-
- .include "jumptab.inc"
- .include "geossym.inc"
-
-_FreeBlock:
- jsr gettrse
- sta r6L
- stx r6H
- jsr FreeBlock
- jmp setoserror
diff --git a/libsrc/geos-cbm/disk/getblock.s b/libsrc/geos-cbm/disk/getblock.s
deleted file mode 100644
index 2342a393c..000000000
--- a/libsrc/geos-cbm/disk/getblock.s
+++ /dev/null
@@ -1,24 +0,0 @@
-
-;
-; Maciej 'YTM/Elysium' Witkowiak
-;
-; 21.12.1999, 2.1.2003
-
-; char GetBlock (struct tr_se *myTS, char *buffer);
-
- .import popax, setoserror
- .import gettrse
- .export _GetBlock
-
- .include "jumptab.inc"
- .include "geossym.inc"
-
-_GetBlock:
- sta r4L
- stx r4H
- jsr popax
- jsr gettrse
- sta r1L
- stx r1H
- jsr GetBlock
- jmp setoserror
diff --git a/libsrc/geos-cbm/disk/getdirhead.s b/libsrc/geos-cbm/disk/getdirhead.s
deleted file mode 100644
index 26d386ba9..000000000
--- a/libsrc/geos-cbm/disk/getdirhead.s
+++ /dev/null
@@ -1,16 +0,0 @@
-
-;
-; Maciej 'YTM/Elysium' Witkowiak
-;
-; 21.12.1999, 2.1.2003
-
-; char GetDirHead (void);
-
- .import setoserror
- .export _GetDirHead
-
- .include "jumptab.inc"
-
-_GetDirHead:
- jsr GetDirHead
- jmp setoserror
diff --git a/libsrc/geos-cbm/disk/getptrcurdknm.s b/libsrc/geos-cbm/disk/getptrcurdknm.s
deleted file mode 100644
index 36797f4e9..000000000
--- a/libsrc/geos-cbm/disk/getptrcurdknm.s
+++ /dev/null
@@ -1,35 +0,0 @@
-
-;
-; Maciej 'YTM/Alliance' Witkowiak
-;
-; 21.12.99
-
-; void GetPtrCurDkNm (char *curName);
-; (fills curName[17] with current disk's name)
-
- .importzp ptr4, ptr3
- .import __oserror
- .export _GetPtrCurDkNm
-
- .include "jumptab.inc"
- .include "geossym.inc"
-
-_GetPtrCurDkNm:
- sta ptr3
- stx ptr3+1
- ldx #ptr4
- jsr GetPtrCurDkNm
- ldy #0
- txa
- bne fin
-namelp: lda (ptr4),y
- cmp #$a0
- beq fin
- sta (ptr3),y
- iny
- cpy #16
- bne namelp
-fin: lda #0
- sta (ptr3),y
- stx __oserror
- rts
diff --git a/libsrc/geos-cbm/disk/gettrse.s b/libsrc/geos-cbm/disk/gettrse.s
deleted file mode 100644
index 525df08af..000000000
--- a/libsrc/geos-cbm/disk/gettrse.s
+++ /dev/null
@@ -1,17 +0,0 @@
-
-;
-; Maciej 'YTM/Alliance' Witkowiak
-;
-; 29.1.00
-
- .export gettrse
- .importzp ptr4
-gettrse:
- sta ptr4
- stx ptr4+1
- ldy #1
- lda (ptr4),y
- tax
- dey
- lda (ptr4),y
- rts
diff --git a/libsrc/geos-cbm/disk/nxtblkalloc.s b/libsrc/geos-cbm/disk/nxtblkalloc.s
deleted file mode 100644
index 532aadba9..000000000
--- a/libsrc/geos-cbm/disk/nxtblkalloc.s
+++ /dev/null
@@ -1,28 +0,0 @@
-
-;
-; Maciej 'YTM/Elysium' Witkowiak
-;
-; 21.12.1999, 2.1.2003
-
-; char NxtBlkAlloc (struct tr_se *startTS, struct tr_se output[], int length );
-
- .import popax, setoserror
- .import gettrse
- .importzp ptr4
- .export _NxtBlkAlloc
-
- .include "jumptab.inc"
- .include "geossym.inc"
-
-_NxtBlkAlloc:
- sta r2L
- stx r2H
- jsr popax
- sta r4L
- stx r4H
- jsr popax
- jsr gettrse
- sta r3L
- stx r3H
- jsr NxtBlkAlloc
- jmp setoserror
diff --git a/libsrc/geos-cbm/disk/opendisk.s b/libsrc/geos-cbm/disk/opendisk.s
deleted file mode 100644
index 89ab42f7e..000000000
--- a/libsrc/geos-cbm/disk/opendisk.s
+++ /dev/null
@@ -1,16 +0,0 @@
-
-;
-; Maciej 'YTM/Elysium' Witkowiak
-;
-; 21.12.1999, 2.1.2003
-
-; char OpenDisk (void);
-
- .import setoserror
- .export _OpenDisk
-
- .include "jumptab.inc"
-
-_OpenDisk:
- jsr OpenDisk
- jmp setoserror
diff --git a/libsrc/geos-cbm/disk/putblock.s b/libsrc/geos-cbm/disk/putblock.s
deleted file mode 100644
index 0488110fd..000000000
--- a/libsrc/geos-cbm/disk/putblock.s
+++ /dev/null
@@ -1,24 +0,0 @@
-
-;
-; Maciej 'YTM/Elysium' Witkowiak
-;
-; 21.12.1999, 2.1.2003
-
-; char PutBlock (struct tr_se *myTS, char *buffer);
-
- .import popax, setoserror
- .import gettrse
- .export _PutBlock
-
- .include "jumptab.inc"
- .include "geossym.inc"
-
-_PutBlock:
- sta r4L
- stx r4H
- jsr popax
- jsr gettrse
- sta r1L
- stx r1H
- jsr PutBlock
- jmp setoserror
diff --git a/libsrc/geos-cbm/disk/putdirhead.s b/libsrc/geos-cbm/disk/putdirhead.s
deleted file mode 100644
index 0561b448e..000000000
--- a/libsrc/geos-cbm/disk/putdirhead.s
+++ /dev/null
@@ -1,16 +0,0 @@
-
-;
-; Maciej 'YTM/Elysium' Witkowiak
-;
-; 21.12.99, 2.1.2003
-
-; char PutDirHead (void);
-
- .import setoserror
- .export _PutDirHead
-
- .include "jumptab.inc"
-
-_PutDirHead:
- jsr PutDirHead
- jmp setoserror
diff --git a/libsrc/geos-cbm/disk/setnextfree.s b/libsrc/geos-cbm/disk/setnextfree.s
deleted file mode 100644
index bd247c1ab..000000000
--- a/libsrc/geos-cbm/disk/setnextfree.s
+++ /dev/null
@@ -1,24 +0,0 @@
-
-;
-; Maciej 'YTM/Alliance' Witkowiak
-;
-; 21.12.99
-
-; struct tr_se SetNextFree (struct tr_se *startTS);
-
- .import __oserror
- .import gettrse
- .export _SetNextFree
-
- .include "jumptab.inc"
- .include "geossym.inc"
-
-_SetNextFree:
- jsr gettrse
- sta r3L
- stx r3H
- jsr SetNextFree
- stx __oserror
- lda r3L
- ldx r3H
- rts
diff --git a/libsrc/geos-cbm/disk/setoserror.s b/libsrc/geos-cbm/disk/setoserror.s
deleted file mode 100644
index 382f56551..000000000
--- a/libsrc/geos-cbm/disk/setoserror.s
+++ /dev/null
@@ -1,16 +0,0 @@
-
-;
-; Maciej 'YTM/Elysium' Witkowiak
-;
-; 2.1.2003
-;
-
- .export setoserror
- .import __oserror
-
-setoserror:
- stx __oserror
- txa
- ldx #0 ; X is cleared (high byte for promoting char to int)
- tay ; Y register is used just to save flags state
- rts
diff --git a/libsrc/geos-common/Makefile b/libsrc/geos-common/Makefile
index 253cf6edf..2f01b87cd 100644
--- a/libsrc/geos-common/Makefile
+++ b/libsrc/geos-common/Makefile
@@ -30,6 +30,7 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
# Directories
DIRS = dlgbox \
+ disk \
file \
graph \
memory \
diff --git a/libsrc/geos-common/disk/Makefile b/libsrc/geos-common/disk/Makefile
new file mode 100644
index 000000000..a6288012d
--- /dev/null
+++ b/libsrc/geos-common/disk/Makefile
@@ -0,0 +1,20 @@
+#
+# makefile for CC65 runtime library
+#
+
+#--------------------------------------------------------------------------
+# Object files
+
+S_OBJS += blkalloc.o \
+ calcblksfree.o \
+ freeblock.o \
+ getblock.o \
+ getdirhead.o \
+ getptrcurdknm.o \
+ gettrse.o \
+ nxtblkalloc.o \
+ opendisk.o \
+ putblock.o \
+ putdirhead.o \
+ setnextfree.o \
+ setoserror.o
diff --git a/libsrc/geos-common/disk/blkalloc.s b/libsrc/geos-common/disk/blkalloc.s
new file mode 100644
index 000000000..15f5a519a
--- /dev/null
+++ b/libsrc/geos-common/disk/blkalloc.s
@@ -0,0 +1,22 @@
+
+;
+; Maciej 'YTM/Elysium' Witkowiak
+;
+; 21.12.1999, 2.1.2003
+
+; char BlkAlloc (struct tr_se output[], int length);
+
+ .import popax, setoserror
+ .export _BlkAlloc
+
+ .include "jumptab.inc"
+ .include "geossym.inc"
+
+_BlkAlloc:
+ sta r2L
+ stx r2H
+ jsr popax
+ sta r4L
+ stx r4H
+ jsr BlkAlloc
+ jmp setoserror
diff --git a/libsrc/geos-common/disk/calcblksfree.s b/libsrc/geos-common/disk/calcblksfree.s
new file mode 100644
index 000000000..ec66d9fc9
--- /dev/null
+++ b/libsrc/geos-common/disk/calcblksfree.s
@@ -0,0 +1,20 @@
+
+;
+; Maciej 'YTM/Alliance' Witkowiak
+;
+; 21.12.99
+
+; int CalcBlksFree (void);
+
+ .import __oserror
+ .export _CalcBlksFree
+
+ .include "jumptab.inc"
+ .include "geossym.inc"
+
+_CalcBlksFree:
+ jsr CalcBlksFree
+ stx __oserror
+ lda r4L
+ ldx r4H
+ rts
diff --git a/libsrc/geos-common/disk/freeblock.s b/libsrc/geos-common/disk/freeblock.s
new file mode 100644
index 000000000..5010d6778
--- /dev/null
+++ b/libsrc/geos-common/disk/freeblock.s
@@ -0,0 +1,20 @@
+
+;
+; Maciej 'YTM/Elysium' Witkowiak
+;
+; 21.12.1999, 2.1.2003
+
+; char FreeBlock (struct tr_se *TS);
+
+ .import gettrse, setoserror
+ .export _FreeBlock
+
+ .include "jumptab.inc"
+ .include "geossym.inc"
+
+_FreeBlock:
+ jsr gettrse
+ sta r6L
+ stx r6H
+ jsr FreeBlock
+ jmp setoserror
diff --git a/libsrc/geos-common/disk/getblock.s b/libsrc/geos-common/disk/getblock.s
new file mode 100644
index 000000000..2342a393c
--- /dev/null
+++ b/libsrc/geos-common/disk/getblock.s
@@ -0,0 +1,24 @@
+
+;
+; Maciej 'YTM/Elysium' Witkowiak
+;
+; 21.12.1999, 2.1.2003
+
+; char GetBlock (struct tr_se *myTS, char *buffer);
+
+ .import popax, setoserror
+ .import gettrse
+ .export _GetBlock
+
+ .include "jumptab.inc"
+ .include "geossym.inc"
+
+_GetBlock:
+ sta r4L
+ stx r4H
+ jsr popax
+ jsr gettrse
+ sta r1L
+ stx r1H
+ jsr GetBlock
+ jmp setoserror
diff --git a/libsrc/geos-common/disk/getdirhead.s b/libsrc/geos-common/disk/getdirhead.s
new file mode 100644
index 000000000..26d386ba9
--- /dev/null
+++ b/libsrc/geos-common/disk/getdirhead.s
@@ -0,0 +1,16 @@
+
+;
+; Maciej 'YTM/Elysium' Witkowiak
+;
+; 21.12.1999, 2.1.2003
+
+; char GetDirHead (void);
+
+ .import setoserror
+ .export _GetDirHead
+
+ .include "jumptab.inc"
+
+_GetDirHead:
+ jsr GetDirHead
+ jmp setoserror
diff --git a/libsrc/geos-common/disk/getptrcurdknm.s b/libsrc/geos-common/disk/getptrcurdknm.s
new file mode 100644
index 000000000..36797f4e9
--- /dev/null
+++ b/libsrc/geos-common/disk/getptrcurdknm.s
@@ -0,0 +1,35 @@
+
+;
+; Maciej 'YTM/Alliance' Witkowiak
+;
+; 21.12.99
+
+; void GetPtrCurDkNm (char *curName);
+; (fills curName[17] with current disk's name)
+
+ .importzp ptr4, ptr3
+ .import __oserror
+ .export _GetPtrCurDkNm
+
+ .include "jumptab.inc"
+ .include "geossym.inc"
+
+_GetPtrCurDkNm:
+ sta ptr3
+ stx ptr3+1
+ ldx #ptr4
+ jsr GetPtrCurDkNm
+ ldy #0
+ txa
+ bne fin
+namelp: lda (ptr4),y
+ cmp #$a0
+ beq fin
+ sta (ptr3),y
+ iny
+ cpy #16
+ bne namelp
+fin: lda #0
+ sta (ptr3),y
+ stx __oserror
+ rts
diff --git a/libsrc/geos-common/disk/gettrse.s b/libsrc/geos-common/disk/gettrse.s
new file mode 100644
index 000000000..525df08af
--- /dev/null
+++ b/libsrc/geos-common/disk/gettrse.s
@@ -0,0 +1,17 @@
+
+;
+; Maciej 'YTM/Alliance' Witkowiak
+;
+; 29.1.00
+
+ .export gettrse
+ .importzp ptr4
+gettrse:
+ sta ptr4
+ stx ptr4+1
+ ldy #1
+ lda (ptr4),y
+ tax
+ dey
+ lda (ptr4),y
+ rts
diff --git a/libsrc/geos-common/disk/nxtblkalloc.s b/libsrc/geos-common/disk/nxtblkalloc.s
new file mode 100644
index 000000000..532aadba9
--- /dev/null
+++ b/libsrc/geos-common/disk/nxtblkalloc.s
@@ -0,0 +1,28 @@
+
+;
+; Maciej 'YTM/Elysium' Witkowiak
+;
+; 21.12.1999, 2.1.2003
+
+; char NxtBlkAlloc (struct tr_se *startTS, struct tr_se output[], int length );
+
+ .import popax, setoserror
+ .import gettrse
+ .importzp ptr4
+ .export _NxtBlkAlloc
+
+ .include "jumptab.inc"
+ .include "geossym.inc"
+
+_NxtBlkAlloc:
+ sta r2L
+ stx r2H
+ jsr popax
+ sta r4L
+ stx r4H
+ jsr popax
+ jsr gettrse
+ sta r3L
+ stx r3H
+ jsr NxtBlkAlloc
+ jmp setoserror
diff --git a/libsrc/geos-common/disk/opendisk.s b/libsrc/geos-common/disk/opendisk.s
new file mode 100644
index 000000000..89ab42f7e
--- /dev/null
+++ b/libsrc/geos-common/disk/opendisk.s
@@ -0,0 +1,16 @@
+
+;
+; Maciej 'YTM/Elysium' Witkowiak
+;
+; 21.12.1999, 2.1.2003
+
+; char OpenDisk (void);
+
+ .import setoserror
+ .export _OpenDisk
+
+ .include "jumptab.inc"
+
+_OpenDisk:
+ jsr OpenDisk
+ jmp setoserror
diff --git a/libsrc/geos-common/disk/putblock.s b/libsrc/geos-common/disk/putblock.s
new file mode 100644
index 000000000..0488110fd
--- /dev/null
+++ b/libsrc/geos-common/disk/putblock.s
@@ -0,0 +1,24 @@
+
+;
+; Maciej 'YTM/Elysium' Witkowiak
+;
+; 21.12.1999, 2.1.2003
+
+; char PutBlock (struct tr_se *myTS, char *buffer);
+
+ .import popax, setoserror
+ .import gettrse
+ .export _PutBlock
+
+ .include "jumptab.inc"
+ .include "geossym.inc"
+
+_PutBlock:
+ sta r4L
+ stx r4H
+ jsr popax
+ jsr gettrse
+ sta r1L
+ stx r1H
+ jsr PutBlock
+ jmp setoserror
diff --git a/libsrc/geos-common/disk/putdirhead.s b/libsrc/geos-common/disk/putdirhead.s
new file mode 100644
index 000000000..0561b448e
--- /dev/null
+++ b/libsrc/geos-common/disk/putdirhead.s
@@ -0,0 +1,16 @@
+
+;
+; Maciej 'YTM/Elysium' Witkowiak
+;
+; 21.12.99, 2.1.2003
+
+; char PutDirHead (void);
+
+ .import setoserror
+ .export _PutDirHead
+
+ .include "jumptab.inc"
+
+_PutDirHead:
+ jsr PutDirHead
+ jmp setoserror
diff --git a/libsrc/geos-common/disk/setnextfree.s b/libsrc/geos-common/disk/setnextfree.s
new file mode 100644
index 000000000..bd247c1ab
--- /dev/null
+++ b/libsrc/geos-common/disk/setnextfree.s
@@ -0,0 +1,24 @@
+
+;
+; Maciej 'YTM/Alliance' Witkowiak
+;
+; 21.12.99
+
+; struct tr_se SetNextFree (struct tr_se *startTS);
+
+ .import __oserror
+ .import gettrse
+ .export _SetNextFree
+
+ .include "jumptab.inc"
+ .include "geossym.inc"
+
+_SetNextFree:
+ jsr gettrse
+ sta r3L
+ stx r3H
+ jsr SetNextFree
+ stx __oserror
+ lda r3L
+ ldx r3H
+ rts
diff --git a/libsrc/geos-common/disk/setoserror.s b/libsrc/geos-common/disk/setoserror.s
new file mode 100644
index 000000000..382f56551
--- /dev/null
+++ b/libsrc/geos-common/disk/setoserror.s
@@ -0,0 +1,16 @@
+
+;
+; Maciej 'YTM/Elysium' Witkowiak
+;
+; 2.1.2003
+;
+
+ .export setoserror
+ .import __oserror
+
+setoserror:
+ stx __oserror
+ txa
+ ldx #0 ; X is cleared (high byte for promoting char to int)
+ tay ; Y register is used just to save flags state
+ rts