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

Commodore 1571 firmware
Format Routine

        .page  
	.subttl 'lccfmt4a.src'

jfmterr dec  cnt        ;  test for retry
        beq  jfmte10      

        jmp  jend         

jfmte10 ldy  #$ff        
        sty  ftnum      ;  clear format

        iny      
        sty  gcrflg      

        jmp  jerrr        

; this subroutine will be called with x*255 for amount of chars written

jclear  lda  pcr2	;  enable write
	and  #$ff-$e0   ;  wr mode=0
	ora  #$c0
	sta  pcr2

        lda  #$ff       ;  make port an output
        sta  ddra2      ;  clear pending
        
        lda  #$55       ;  write a 1f pattern
        ldy  #00         
1$	bit  pota1
	bmi  1$

	bit  byt_clr
        sta  data2       

        dey      
        bne  1$

        dex     	;  dex amount * 255
        bne  1$

        rts


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