commit 8756e372ed879030196634ffeedaf2878be67559 Author: Bill Chatfield Date: Fri Feb 2 17:16:08 2018 -0500 Initial commit diff --git a/AppleCommander-1.3.5.14.jar b/AppleCommander-1.3.5.14.jar new file mode 100644 index 0000000..90d3681 Binary files /dev/null and b/AppleCommander-1.3.5.14.jar differ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e631889 --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +# Compiles with https://www.brutaldeluxe.fr/products/crossdevtools/merlin/ +# +ifeq ($(OS),Windows_NT) + MERLIN_DIR=C:/opt/Merlin32_v1.0 + MERLIN_LIB=$(MERLIN_DIR)/Library + MERLIN=$(MERLIN_DIR)/Windows/Merlin32 + RM=del /s +else + MERLIN_DIR=/opt/Merlin32_v1.0 + MERLIN_LIB=$(MERLIN_DIR)/Library + MERLIN=$(MERLIN_DIR)/Windows/Merlin32 + RM=rm -f +endif + +AC=java -jar AppleCommander-1.3.5.14.jar +SRC=delkeyhandlergid.s +PGM=DELKEYHANDLERGID +VOL=$(PGM) +DSK=$(PGM).dsk + +$(DSK): $(PGM) + $(AC) -pro140 $(DSK) $(VOL) + $(AC) -p $(DSK) $(PGM) SYS < $(PGM) + +$(PGM): $(SRC) + $(MERLIN) $(MERLIN_LIB) $(SRC) + +clean: + $(RM) $(DSK) $(PGM) + diff --git a/delkeyhandlergid.s b/delkeyhandlergid.s new file mode 100644 index 0000000..932416f --- /dev/null +++ b/delkeyhandlergid.s @@ -0,0 +1,55 @@ +******************************** +* * +* DELKEYHANDLERGID - MAKES THE * +* DELETE KEY WORK LIKE THE * +* BACKSPACE ON A PC * +* * +* AUTHOR: gid...@sasktel.net * +* MERLINIFY: Bill Chatfield * +* LICENSE: GPL2 * +* * +******************************** + + ORG $803 + +******************************** +* * +* CONSTANTS * +* * +******************************** + +VECTOUT EQU $BE30 ;VECTOUT LOW +VECTIN EQU $BE32 ;VECTIN LOW +VECTINH EQU $BE33 ;VECTIN HIGH + +* FOR PRODOS +* setup Basic.system vectors for input + LDA #DELETE + STA VECTIN+1 + RTS + +* FOR DOS 3.3 +* setup Dos vectors to get a keypress +* LDA #DELETE +* STA $39 +* JMP $3EA + +DELETE BIT $C01F ; are we in 80-col mode? + BMI COL80 ; branch if yes + JSR $FD1B ; changed from $FD0C + BNE DEL2 + +COL80 JSR $C305 ; for 80-col input + +DEL2 CMP #$FF ; is the Delete key pressed; change to something else for the Apple II or II+ + BNE RETURN ; if not then let DOS or Basic.sys handle the keypress + LDA #$88 ; go back one space; same action as the left arrow + JSR $FDED ; print it + LDA #$A0 ; print a space + JSR $FDED + LDA #$88 ; go back over the space +RETURN RTS ; let Dos or BS handle the last character