Add QUIT.SYSTEM

This commit is contained in:
Joshua Bell 2019-10-01 21:14:34 -07:00
parent 16599fc4b9
commit cfb8cab3b2
4 changed files with 52 additions and 1 deletions

11
.travis.yml Normal file
View File

@ -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

View File

@ -2,7 +2,7 @@
CAFLAGS = --target apple2enh --list-bytes 0 CAFLAGS = --target apple2enh --list-bytes 0
LDFLAGS = --config apple2-asm.cfg 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 .PHONY: clean all
all: $(TARGETS) all: $(TARGETS)

View File

@ -60,3 +60,8 @@ next file starting with 'C').
There are a few spare bytes to play with and more can be squeezed There are a few spare bytes to play with and more can be squeezed
out, so perhaps further improvements can be made. 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.

35
quit.system.s Normal file
View File

@ -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