JOYEDIT0ASM 
 
;JOYSTICK-Routine f}r KC 85/3/4
;Datum:	02.04.1989
;Bearbeiter: pi-soft
 
;verwendeter Modul DIO
;Steckplatz: beliebig
;eigenst{ndiges Suchen + aktivieren
 
PIAD	EQU	4
PIAC	EQU	6
CTC	EQU	0
SYS	EQU	0F003H
ARGN	EQU	0B781H
;---------------------------------------
START:	LD	A,MCOL
	LD	(0B7A3H@,A
	LD	HL,MJOY
	CALL	SYS
	DEFB	45H
MJOY:	DEFW	0C0DH
	DEFW	0A0AH
	DEFW	0A0AH
	DEFM	'         *JOY-EDITOR*'
	DEFW	0A0DH
	DEFW	0A0AH
	DEFW	0A0AH
	DEFM	'     to activate '
	DEFW	0A0DH
	DEFB	0AH
	DEFM	'     to change speed'
	DEFW	0A0DH
	DEFB	0AH
	DEFM	'     to redefine Joy'
	DEFW	0A0DH
	DEFB	0AH
	DEFM	'     to change start-'
	DEFM	'address'
	DEFW	0A0DH
	DEFB	0AH
	DEFM	'     to show data'
	DEFW	0A0DH
	DEFB	0AH
	DEFM	'     return to CAOS'
	DEFW	0A0DH
	DEFB	0AH
	NOP
MSPEED:	DEFW	0C0DH
	DEFW	0A0AH
	DEFW	0A0AH
	DEFM	'     slow'
	DEFW	0A0DH
	DEFW	0A0AH
	DEFM	'     middle'
	DEFW	0A0DH
	DEFW	0A0AH
	DEFM	'     fast'
	DEFW	0A0DH
	DEFW	0A0AH
	DEFM	'     superfast'
	DEFW	0A0DH
	NOP
 
;.......................................
	DEFW	7F7FH
	DEFM	'JOY'
	DEFB	1
	LD	A,0FFH
	OUT	(PIAC),A
	LD	A,1FH	;Maske
	OUT	(PIAC),A
	LD	HL,INT
	LD	(1D8H),HL ;Vektor
	OUT	(CTC),A
	LD	A,0B7H
	OUT	(CTC),A
	LD	A,(SPEE) ;Zeitkonstante
JOUT:	OUT	(CTC),A
	RET
;---------------------------------------
 	DEFW	7F7FH
	DEFM	'JOF'
	DEFB	1
	LD	A,3
	JR	JOUT
 
INT:	PUSH	AF
	PUSH	HL
	EI
	IN	A,(PIAD)
	AND	1FH	;nur Bit 0-4
	CP	1FH
	JR	NZ,INT0
	BIT	2,(IX+8)
	RES	2,(IX+8)
	JR	Z,ZURU
	LD	(IX+13),0
	JR	ZURU
INT0:	LD 	HL,TAB
INT1:	INC	HL
	RR	A
	JR	C,INT1
	LD	A,M
	LD	(IX+13),A
ZURV:	SET	0,(IX+8)
	SET	2,(IX+8)
ZURU:	POP	HL
	POP	AF
	RETI
TAB:	NOP
	DEFB	11
	DEFB	13
	DEFB	10
	DEFB	8
	DEFB	9
	NOP
Íð#



         *JOY-EDITOR*