Split out quit.system

This commit is contained in:
Joshua Bell 2019-10-03 21:55:36 -07:00
parent 0f41276584
commit d10429b3a0
6 changed files with 37 additions and 22 deletions

View File

@ -1,4 +1,4 @@
targets := ns.clock cricket bbb ram.drv
targets := ns.clock cricket bbb ram.drv quit
.PHONY: all $(targets)

View File

@ -2,7 +2,7 @@
CAFLAGS = --target apple2enh --list-bytes 0
LDFLAGS = --config apple2-asm.cfg
TARGETS = bye.system.SYS buhbye.system.SYS quit.system.SYS
TARGETS = bye.system.SYS buhbye.system.SYS
# For timestamps
MM = $(shell date "+%-m")

View File

@ -60,8 +60,3 @@ next file starting with 'C').
There are a few spare bytes to play with and more can be squeezed
out, so perhaps further improvements can be made.
## QUIT.SYSTEM
This just invokes the ProDOS quit handler immediately. It can
be used as the last in a chain of "driver" installers.

27
quit/Makefile Normal file
View File

@ -0,0 +1,27 @@
CAFLAGS = --target apple2enh --list-bytes 0
LDFLAGS = --config apple2-asm.cfg
TARGETS = quit.system.SYS
# For timestamps
MM = $(shell date "+%-m")
DD = $(shell date "+%-d")
YY = $(shell date "+%-y")
DEFINES = -D DD=$(DD) -D MM=$(MM) -D YY=$(YY)
.PHONY: clean all
all: $(TARGETS)
HEADERS = $(wildcard *.inc) $(wildcard ../inc/*.inc)
clean:
rm -f *.o
rm -f $(TARGETS)
%.o: %.s $(HEADERS)
ca65 $(CAFLAGS) $(DEFINES) --listing $(basename $@).list -o $@ $<
%.SYS: %.o
ld65 $(LDFLAGS) -o $@ $<
xattr -wx prodos.AuxType '00 20' $@

4
quit/README.md Normal file
View File

@ -0,0 +1,4 @@
## QUIT.SYSTEM
This just invokes the ProDOS quit handler immediately. It can be used as the last in a chain of "driver" installers to invoke the program selector (e.g. [Bitsy Bye](https://prodos8.com/bitsy-bye/), [Bird's Better Bye](../bbb), etc)

View File

@ -1,17 +1,11 @@
.setcpu "6502"
.include "apple2.inc"
.include "prodos.inc"
.org $2000
.include "../inc/apple2.inc"
.include "../inc/prodos.inc"
CLR80VID := $C00C
ROMIN2 := $C082
SETVID := $FE93
SETKBD := $FE89
INIT := $FB2F
HOME := $FC58
SETNORM := $FE84
.org SYS_ADDR
cld
bit ROMIN2
@ -27,9 +21,4 @@ SETNORM := $FE84
MLI_CALL QUIT, quit_params
brk
quit_params:
.byte 4
.byte 0
.word 0
.byte 0
.word 0
DEFINE_QUIT_PARAMS quit_params