From cfb8cab3b2f1fb0cedfe48c083e29d0080b5030c Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Tue, 1 Oct 2019 21:14:34 -0700 Subject: [PATCH] Add QUIT.SYSTEM --- .travis.yml | 11 +++++++++++ Makefile | 2 +- README.md | 5 +++++ quit.system.s | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 .travis.yml create mode 100644 quit.system.s diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5650818 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +sudo: enabled +os: osx +language: c + +install: +- git clone https://github.com/cc65/cc65 /tmp/cc65 && + sudo make -C /tmp/cc65 ca65 ld65 avail && + ca65 --version + +script: + - make diff --git a/Makefile b/Makefile index 1767cc9..deb43b7 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ CAFLAGS = --target apple2enh --list-bytes 0 LDFLAGS = --config apple2-asm.cfg -TARGETS = bye.system.SYS buhbye.system.SYS +TARGETS = bye.system.SYS buhbye.system.SYS quit.system.SYS .PHONY: clean all all: $(TARGETS) diff --git a/README.md b/README.md index c464301..6ccf5ed 100644 --- a/README.md +++ b/README.md @@ -60,3 +60,8 @@ 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. diff --git a/quit.system.s b/quit.system.s new file mode 100644 index 0000000..efb4231 --- /dev/null +++ b/quit.system.s @@ -0,0 +1,35 @@ + + .setcpu "6502" + .include "apple2.inc" + .include "prodos.inc" + + .org $2000 + +CLR80VID := $C00C +ROMIN2 := $C082 +SETVID := $FE93 +SETKBD := $FE89 +INIT := $FB2F +HOME := $FC58 +SETNORM := $FE84 + + cld + bit ROMIN2 + sta CLR80VID + sta CLRALTCHAR + sta CLR80COL + jsr SETVID + jsr SETKBD + jsr SETNORM + jsr INIT + jsr HOME + + MLI_CALL QUIT, quit_params + brk + +quit_params: + .byte 4 + .byte 0 + .word 0 + .byte 0 + .word 0