Classic Computer Magazine Archive PROGRAM LISTING: 82-06/VBICALL.SRC


;
; Listing #2
; by Stan Ockers
; for ANTIC The ATARI Resource
; a Vertical Blank Interrupt routine
; call from BASIC A=USR(1536)
;
	ORG	$600	; page six location
	PLA		; ignore parameter count
	LDY	#$0A	; lo-byte VBI routine
	LDX	#$06	; hi-byte VBI routine
	LDA	#07	; deferred VBI
	JMP	$E45C	; O.S. inserts VBI
VBI	LDA	#00	; zero ?
	CMP	$D0	; move flag plyr 0
	BEQ	SKP	; forget plyr 0
	INC	$CE	; one space right
	LDX	$CE	; update
	STX	$D000	; horiz pos. plyr 0
SKP	CMP	$D1	; mov flag 1 0 ?
	BEQ	OUT	; yes forget p1yr 1
	DEC	$CF	; one space left
	LDX	$CF	; update
	STX	$D001	; horiz pos. plyr I
OUT	JMP	$E462	; VBI exit thru O.S.


Back to previous page