mirror of https://github.com/gungwald/copy.git
Added stuff
This commit is contained in:
parent
70d2dd122d
commit
a63dc4abee
Binary file not shown.
8
LICENSE
8
LICENSE
|
@ -1,7 +1,7 @@
|
||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
Version 2, June 1991
|
Version 2, June 1991
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
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
|
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.
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
{description}
|
||||||
Copyright (C) <year> <name of author>
|
Copyright (C) {year} {fullname}
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
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
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
<signature of Ty Coon>, 1 April 1989
|
{signature of Ty Coon}, 1 April 1989
|
||||||
Ty Coon, President of Vice
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
This General Public License does not permit incorporating your program into
|
This General Public License does not permit incorporating your program into
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#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;
|
||||||
|
}
|
||||||
|
|
|
@ -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 LOW BYTE INTO ACCUMULATOR
|
||||||
|
ldx #>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
|
||||||
|
|
Loading…
Reference in New Issue