home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1992 December / 64er_Magazin_92-12_1992_Markt__Technik_de_Side_A.d64 / eci++_ascii < prev    next >
Text File  |  2022-10-26  |  4KB  |  135 lines

  1.  
  2. ;***************************************
  3. ;* >>>>> the perfect eci-routine <<<<< *
  4. ;*  >>>>> written in august '92 <<<<<  *
  5. ;*   >>>>>    by mr.perfect    <<<<<   *
  6. ;*                                     *
  7. ;*      based on the eci-splitter      *
  8. ;*        written by uwe michel        *
  9. ;***************************************
  10.  
  11. +lines    =$02    ;anzahl der eci-zeilen
  12.  
  13. ;******** source (professional-ass!) ***
  14.  
  15.          .setpc $c000    ;startadresse
  16.  
  17.           lda #1         ;char-color
  18.           sta 646        ;weiss
  19.           jsr $e544      ;clear screen
  20.           lda #21        ;eci ueber 21
  21.           sta lines      ;rasterzeilen
  22.           ldx #0         ;schwarzen
  23.           stx $d020      ;border und
  24.           stx $d021      ;screen
  25.  
  26.           lda #$f5       ;bitmuster
  27. +clrl1    sta $4000,x    ;fuer fli-
  28.           sta $4100,x    ;darstellung
  29.           inx            ;festlegen
  30.           bne clrl1      ;...
  31.  
  32.           ldy #tablen    ;$d018
  33.           lda #$10       ;wertetabelle
  34. +maketab1 sta tab-1,y    ;fuer
  35.           dey            ;'zick-zack'
  36.           clc            ;effekt
  37.           adc #$10       ;generieren
  38.           bvc maketab1
  39.           lda #$60
  40. +maketab2 sta tab-1,y
  41.           dey
  42.           beq makecol0
  43.           sec
  44.           sbc #$10
  45.           bne maketab2
  46.           lda #$20
  47.           bne maketab1
  48.  
  49. +makecol0 ldx #39        ;color-tabellen
  50. +makecol1 lda colors+0,x ;anlegen
  51.           sta $4400,x
  52.           lda colors+1,x
  53.           sta $4800,x
  54.           lda colors+2,x
  55.           sta $4c00,x
  56.           lda colors+3,x
  57.           sta $5000,x
  58.           lda colors+4,x
  59.           sta $5400,x
  60.           lda colors+5,x
  61.           sta $5800,x
  62.           lda colors+6,x
  63.           sta $5c00,x
  64.           dex
  65.           bpl makecol1
  66.  
  67.           sei       ;interrupt sperren
  68.           lda #$c8  ;normaler 40-zeichen
  69.           sta $d016 ;bildschirm
  70.           lda #$7f  ;irq-maske fuer
  71.           sta $dc0d ;cia loeschen
  72.           lda #$01  ;nur rasterinterrupt
  73.           sta $d01a ;zulassen
  74.           lda #$32  ;und zwar in zeile
  75.           sta $d012 ;$32
  76.           ldx #<eci ;irq-vektor auf
  77.           ldy #>eci ;eci-routine
  78.           stx $0314 ;verbiegen
  79.           sty $0315 ;...
  80.           cli       ;interrupt zulassen
  81. +ende     rts       ;return
  82.  
  83. ;******** interrupt-routinen ***********
  84.  
  85. +eci      inc $d019      ;irq loeschen
  86.           dec $dd00      ;vic-bank=$4000
  87.  
  88.           clc            ;akku-startwert
  89.           lda #$33       ;festlegen
  90.           ldy lines      ;anzahl holen
  91.           beq noeci      ;kein eci ?
  92. +mloop    ldx tab,y      ;fli ueber
  93.           sta $d011      ;y rasterzeilen
  94.           stx $d018      ;legen
  95.           adc #1         ;neuen $d011-
  96.           and #%00110111 ;wert berechnen
  97.           dey            ;schon fertig ?
  98.           bne mloop      ;nein, nochmal
  99.  
  100. +noeci    lda #$70       ;bildschirm
  101.           sta $d011      ;schwarz
  102. +wl1      lda $d012      ;auf naechste
  103.           and #%00000111 ;bildschirm-
  104.           bne wl1        ;zeile warten
  105.           inc $dd00      ;vic-bank und
  106.           ldx #$16       ;farbram wieder
  107.           stx $d018      ;normalisieren
  108.           lda #$19       ;screen wieder
  109.           sta $d011      ;einschalten
  110.  
  111.           ldx #tablen    ;eci-tabelle
  112. +movetab  lda tab-1,x    ;verschieben
  113.           sta tab,x      ;.
  114.           dex            ; .
  115.           bne movetab    ;  .
  116.           lda tab+tablen ;   .
  117.           sta tab        ;    .
  118.  
  119.           jmp $ea31      ;und tschuess!
  120.  
  121. ;******** tabellen *********************
  122.  
  123. +colors  .b $17,$7f,$fc,$c8,$8b,$b9,$90
  124.          .b $06,$60,$09,$92,$28,$8a,$af
  125.          .b $f7,$71,$17,$7f,$fa,$a8,$82
  126.          .b $29,$90,$09,$90,$09,$9b,$b8
  127.          .b $b8,$8c,$cf,$f7,$71,$17,$7f
  128.          .b $fc,$c8,$8b,$b9,$90,$06,$6b
  129.          .b $b4,$4e,$ef,$f7,$71,$0c,$00
  130. +tab     .b $00 ;tabelle wird generiert
  131. +tablen   = 204 ;fuer max. 204 zeilen
  132.  
  133.          .endsource
  134.  
  135.