home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ABBUC Magazin 42B
/
ABBUC_Magazin_42_19xx_ABBUC_Side_B_b.atr
/
kurs1.src
< prev
next >
Wrap
Text File
|
2023-02-26
|
4KB
|
1 lines
scradr:EQU $7000¢ dlistv:EQU 560¢ v0:EQU $B0¢ v1:EQU $B2¢ nmien:EQU $D40E¢ scrtabl:EQU $4600¢ scrtabh:EQU $4700¢ bytetab:EQU $4800¢ pixtab:EQU $4900¢ pixtabc:EQU $4A00¢ phasetab:EQU $4B00¢ zaehltab:EQU $4C00¢ xpostab:EQU $4D00¢ ypostab:EQU $4E00¢ offset:EQU 32 ; Laenge einer Zeile in Bytes¢ vbiv:EQU 548¢ ; ¢ ORG $3000¢ init:LDA #0¢ STA $14¢ STA $15¢ STA nmien¢ JSR tabinit ; tabellen initialisieren¢ JSR clear ; Bildschirm loeschen¢ LDA #dlist ; neue Display-List¢ STA dlistv ; einschalten¢ LDA #>dlist¢ STA dlistv+1¢ LDA #vbi¢ STA vbiv¢ LDA #>vbi¢ STA vbiv+1¢ LDA #33¢ STA 559 ; auf 256-pixel Darstellung¢ LDA #$40 ; Interrupts wieder¢ STA nmien ; zulassen¢ loop:LDA 53279¢ CMP #6 ; start gedrueckt?¢ BNE loop¢ LDA #0¢ STA nmien¢ LDA #$62¢ STA vbiv¢ LDA #$E4¢ STA vbiv+1¢ LDA #$40¢ STA nmien¢ RTS ¢ TABINIT:LDA #0¢ LDX #0¢ tab0:STA SCRTABL,X¢ STA SCRTABH,X¢ STA BYTETAB,X¢ STA PIXTAB,X¢ STA PIXTABC,X¢ STA PHASETAB,X¢ STA ZAEHLTAB,X¢ STA XPOSTAB,X¢ INX ¢ BNE tab0¢ LDA #scradr¢ STA V0¢ LDA #>scradr¢ STA V0+1¢ LDX #0¢ tab1:LDA V0¢ STA SCRTABL,X¢ LDA V0+1¢ STA SCRTABH,X¢ CLC ¢ LDA V0¢ ADC #OFFSET¢ STA V0¢ LDA V0+1¢ ADC #0¢ STA V0+1¢ INX ¢ BNE tab1¢ LDX #0¢ tab2:TXA ¢ CLC ¢ LSR ¢ LSR ¢ LSR ¢ STA BYTETAB,X¢ INX ¢ BNE tab2¢ LDX #0¢ tab3:LDA BYTETAB,X¢ CLC ¢ ASL ¢ ASL ¢ ASL ¢ STA BYTE¢ SEC ¢ TXA ¢ SBC BYTE¢ TAY ¢ LDA PIXWERT,Y¢ STA PIXTAB,X¢ LDA PIXWERTC,Y¢ STA PIXTABC,X¢ INX ¢ BNE tab3¢ RTS ¢ PLOT:LDX XPOS¢ LDA BYTETAB,X¢ STA BYTE¢ LDA PIXTAB,X¢ STA PIXEL¢ LDX YPOS¢ LDA SCRTABL,X¢ STA V0¢ LDA SCRTABH,X¢ STA V0+1¢ LDY BYTE¢ LDA (V0),Y¢ plot0:ORA PIXEL¢ STA (V0),Y¢ RTS ¢ CLEAR:LDA #SCRADR¢ STA V0¢ LDA #>SCRADR¢ STA V0+1¢ LDX #128¢ cl0:LDY #0¢ LDA #0¢ cl1:STA (V0),Y¢ INY ¢ CPY #40¢ BCC cl1¢ CLC ¢ LDA V0¢ ADC #OFFSET¢ STA V0¢ LDA V0+1¢ ADC #0¢ STA V0+1¢ DEX ¢ BNE cl0¢ RTS ¢ PLOTC:LDX XPOS¢ LDA BYTETAB,X¢ STA BYTE¢ LDA PIXTABC,X¢ STA PIXEL¢ LDX YPOS2¢ LDA SCRTABL,X¢ STA V0¢ LDA SCRTABH,X¢ STA V0+1¢ LDY BYTE¢ LDA (V0),Y¢ AND PIXEL¢ STA (V0),Y¢ RTS ¢ BEWEG1:LDA #0¢ STA PIXC¢ BEWEG:LDX PIXC ; Nr.des Pixels¢ LDA PHASETAB,X ; in welcher Phase¢ BEQ bew0 ; bef. sich Pixel¢ CMP #1 ; 1 => X-Pos. ermitteln¢ BEQ bew1¢ CMP #2 ; 2 => "fallen" lassen¢ BCS bew2¢ bew9:INC PIXC ; naechstes Pixel¢ LDA PIXC¢ CMP PHASE¢ BCC BEWEG¢ RTS ¢ bew0:LDA 53770 ; zufaellige Pos. ermitteln¢ STA XPOSTAB,X ; in Tabelle¢ LDA #1 ; naechste Phase¢ STA PHASETAB,X¢ BNE bew9 ; weiter nach bew9¢ bew1:LDA #0 ; Zaehler auf 0 setzen¢ STA ZAEHLTAB,X¢ LDA #2 ; nun bewegen¢ STA PHASETAB,X¢ BNE bew9¢ bew2:LDX PIXC ; Nr. des Pixels¢ LDA ZAEHLTAB,X ; Zaehler fuer Y-Position¢ TAX ; als offset fuer y-Tabelle¢ LDA $6400,X ; Y-Tabelle¢ STA YPOS2 ; Wert zum loeschen¢ LDA $6401,X ; Wert zum Setzen¢ STA YPOS¢ LDX PIXC¢ LDA XPOSTAB,X ; X-Pos holen¢ STA XPOS ; altes Pixel loeschen¢ JSR PLOTC ; neues Pixel setzen¢ JSR PLOT¢ LDX PIXC¢ INC ZAEHLTAB,X¢ LDA ZAEHLTAB,X¢ CMP #$75 ; max. Anzahl der y-Werte¢ BNE bew9 ; erreicht?¢ LDA #0 ; ja, dann von vorne¢ STA PHASETAB,X¢ BEQ bew9¢ ; ¢ vbi:JSR beweg1¢ INC vbicount¢ LDA vbicount¢ BNE vbiend¢ INC phase¢ vbiend:JMP $E462¢ PIXWERT:DFB $80,$40,$20,$10,$8,$4,$2,$1¢ pixwertc:DFB $7F,$BF,$DF,$EF,$F7,$FB,$FD,$FE¢ byte:DFB 0¢ xpos:DFB 0¢ ypos:DFB 0¢ ypos2:DFB 0¢ pixel:DFB 0¢ pixc:DFB 0¢ phase:DFB 1 ; Anzahl der Pixel¢ vbicount:DFB 0¢ ; ¢ ; neue Display-List¢ ; ¢ ORG $4000¢ dlist:DFB $70,$42¢ lms:DFW titel¢ DFB $70,$4F¢ DFW scradr¢ DFB 15,15,15,15,15,15,15¢ DFB 15,15,15,15,15,15,15,15¢ DFB 15,15,15,15,15,15,15,15¢ DFB 15,15,15,15,15,15,15,15¢ DFB 15,15,15,15,15,15,15,15¢ DFB 15,15,15,15,15,15,15,15¢ DFB 15,15,15,15,15,15,15,15¢ DFB 15,15,15,15,15,15,15,15¢ DFB 15,15,15,15,15,15,15,15¢ DFB 15,15,15,15,15,15,15,15¢ DFB 15,15,15,15,15,15,15,15¢ DFB 15,15,15,15,15,15,15,15¢ DFB 15,15,15,15,15,15,15,15¢ DFB 15,15,15,15,15,15,15,15¢ DFB 15,15,15,15,15,15,15,15¢ DFB 15,15,15,15,15,15,15,15¢ DFB $41¢ DFW dlist¢ titel:ASC %Beispiel 1-Demokurs Teil 1%¢ ¢