[Contents] [Commodore] [New] [Search] [Home]

Commodore 1571 firmware
Interrupt routine

        .page  
	.subttl 'irq1571.src'

jirq	pha     	; save .a,.x,.y
        txa      
        pha      
        tya      
        pha      

        lda  icr	; chk for fast byte
	and  #8
	beq  irq_1

irq_0	lda  fastsr      
        ora  #$40       ; set byte in flag
        sta  fastsr      
	bne  irq_2	; bra

irq_1	lda  ifr1	; test for atn
	and  #2
	beq  1$

	bit  pa1	; clear (ca1)
	lda  #1         ; handle atn request
        sta  atnpnd     ; flag atn is pending

1$	tsx     	; check break flag
        lda  $0104,x    ; check processor status
        and  #$10        
        beq  2$

        jsr  jlcc       ; forced irq do controller job

2$	lda  ifr2	; test if timer
	asl  a
	bpl  3$

        jsr  jlcc       ; goto controller

3$
irq_2	pla     	; restore .y,.x,.a
        tay      
        pla      
        tax      
        pla      
        rti


[Contents] [Commodore] [New] [Search] [Home]
This page has been created by Sami Rautiainen.
Read the small print. Last updated March 24, 1998.