;---------------------------------------
;fade tab maker
;---------------------------------------

put      = $fc

         *= $4800


         sei
         lda #$00
         sta put
         lda #$50
         sta put+1
         lda #$00
         sta t1

hop2     ldy #$00
hop1     tya
         and #$0f
         tax
         lda t1
         cmp c1,x
         bcc ztabeli
         txa
         jmp k1

ztabeli  ldx t1
         lda coltab,x
k1       sta t2

         tya
         and #$f0
         lsr a
         lsr a
         lsr a
         lsr a

         tax
         lda t1
         cmp c1,x
         bcc kztabeli
         txa
         jmp kk1
kztabeli ldx t1
         lda coltab,x
kk1      asl a
         asl a
         asl a
         asl a
         ora t2
         sta (put),y
         iny
         bne hop1


         inc put+1
         inc t1
         lda t1
         cmp #$10
         bne hop2
         rts




coltab   .byte $01,$0d,$07,$0f,$03
         .byte $05,$0a,$0c,$0e,$08
         .byte $04,$02,$0b,$06,$09
         .byte $00

c1       .byte $10,$01,$0c,$05,$0b
         .byte $06,$0e,$03,$0a,$0f
         .byte $07,$0d,$08,$02,$09
         .byte $04


t1       .byte 0
t2       .byte 0

;---------------------------------------

