diff --git a/AppleCommander-ac-1.4.0.jar b/AppleCommander-ac-1.4.0.jar
new file mode 100644
index 0000000..4d61bfc
Binary files /dev/null and b/AppleCommander-ac-1.4.0.jar differ
diff --git a/LICENSE b/LICENSE
index d159169..23cb790 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -290,8 +290,8 @@ to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
-
- Copyright (C)
+ {description}
+ Copyright (C) {year} {fullname}
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -329,7 +329,7 @@ necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
- , 1 April 1989
+ {signature of Ty Coon}, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..7a45122
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,44 @@
+# Builds copy command
+
+# Requirements:
+# 1. Gmake must be used.
+# 2. The cc65 compiler must be properly setup.
+
+ifndef CC65_TARGET
+ CC65_TARGET:=apple2enh
+endif
+
+CC=cl65
+CFLAGS=-O -t $(CC65_TARGET) -DTRACE
+LDFLAGS=-t $(CC65_TARGET)
+PGM=copy
+DISK_VOL=$(PGM)
+DISK=$(DISK_VOL).dsk
+AC=java -jar AppleCommander-ac-1.4.0.jar
+SYS_LOAD_ADDR=0x2000
+BIN_LOAD_ADDR=0x0803
+BASIC_AUX_TYPE=0x0801
+READ_TIME_LOAD_ADDR=0x0260
+MKDISK=$(AC) -pro140 $(DISK) $(DISK_VOL)
+
+########################################
+
+all: $(DISK)
+
+$(DISK): $(PGM)
+ $(RM) $(DISK)
+ $(AC) -pro140 $(DISK) $(DISK_VOL)
+ $(AC) -as $(DISK) $(PGM) BIN < $(PGM)
+
+$(PGM): online.o $(PGM).o
+ $(CC) $(LDFLAGS) -o $@ $^
+
+$(PGM).o: $(PGM).c
+ $(CC) $(CFLAGS) $^
+
+online.o: online.c
+ $(CC) $(CFLAGS) $^
+
+clean:
+ $(RM) *.o $(PGM) $(DISK)
+
diff --git a/online.c b/online.c
new file mode 100644
index 0000000..71741bf
--- /dev/null
+++ b/online.c
@@ -0,0 +1,33 @@
+#include
+
+#define PRODOS_MLI 0xbf00
+#define ON_LINE_SYSTEM_CALL 0xc5
+#define PRODOS_FILE_NAME_MAX_LEN 15
+typedef char ProdosFileName[PRODOS_FILE_NAME_MAX_LEN + 1];
+typedef ProdosFileName ProdosFileNameArray16[16];
+typedef struct OnlineSystemCallArguments {
+ uint8_t argumentCount;
+ uint8_t unitNumber;
+ ProdosFileNameArray16 *volumesOutputBuffer;
+} OnlineSystemCallArguments;
+
+static ProdosFileNameArray16 volumes;
+static OnlineSystemCallArguments arguments;
+
+ProdosFileNameArray16 *online(uint8_t *errorCode)
+{
+ arguments.argumentCount = 2;
+ arguments.unitNumber = 0; // All units
+ arguments.volumesOutputBuffer = &volumes;
+
+ __asm__("jsr %w", PRODOS_MLI);
+ __asm__("db %b", ON_LINE_SYSTEM_CALL);
+ __asm__("da %v", &arguments);
+ __asm__("bne %g", errorHandler);
+
+ return &volumes;
+
+errorHandler:
+ return errorCode;
+}
+
diff --git a/online.s b/online.s
new file mode 100644
index 0000000..331cc6e
--- /dev/null
+++ b/online.s
@@ -0,0 +1,26 @@
+ .export _onLineSysCall
+ .export _onLineVols
+
+ON_LINE = $c5 ;ID FOR ON_LINE MLI SYSTEM CALL
+PRODOS_MLI = $bf00 ;ADDRESS OF MLI ENTRY POINT
+
+.proc _onLineSysCall
+
+ jsr PRODOS_MLI ;CALL MACHINE LANGUAGE INTERFACE
+ .byte ON_LINE ;SPECIFY THE ON_LINE SYSTEM CALL
+ .addr onlineArgs ;SPECIFY ADDRESS OF ARGUMENTS
+
+ sta retCode ;Store the return code
+ lda #retCode ;PUT HIGH BYTE INTO X
+ rts
+.endproc
+
+.bss
+retCode: .byte 0
+_onLineVols:.res 256 ;SPACE FOR 16 DISK VOL RECORDS
+
+onlineArgs: .byte 2 ;PARAMETER COUNT
+ .byte 0 ;UNIT NUMBER, 0=ALL
+ .addr _onLineVols ;ADDRESS OF OUTPUT BUFFER
+