home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er Special 20
/
64er_Magazin_Sonderheft_20_19xx_Markt__Technik_de_Side_A.d64
/
hi-scroller.src
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
3KB
|
115 lines
990 sys4096*9:.opt p,oo:*=49152
1000 jmp right
1010 jmp left
1020 jmp up
1030 jmp down
1040 graf = $2000
1050 ;################################
1060 ;### zyl. right scrolling ###
1070 ;################################
1080 right lda #<graf:sta $fc
1090 ldx #>graf:stx $fd:inx:stx $fb
1100 lda #<graf+312:sta $fa
1110 lda #8:sta $14:lda #25:sta $15
1120 a2 ldy #0:ldx #40
1130 lda ($fa),y:sta $fe
1140 a1 ror $fe
1150 lda ($fc),y:sta $fe:ror a
1160 sta ($fc),y:lda $fc:clc:adc #8
1170 sta $fc:lda $fd:adc #0:sta $fd
1180 dex:bne a1
1190 dec $fd:lda $fc:sec:sbc #63:sta $fc
1200 lda $fd:sbc #0:sta $fd
1210 inc $fa:bne a4:inc $fb
1220 a4 dec $14:bne a2
1230 inc $fb:lda $fa:clc:adc #56:sta $fa
1240 lda $fb:adc #0:sta $fb
1250 inc $fd:lda $fc:clc:adc #56:sta $fc
1260 lda $fd:adc #0:sta $fd
1270 lda #8:sta $14:dec $15:bne a2:rts
1280 ;################################
1290 ;### zyl. left scrolling ###
1300 ;################################
1310 left lda #<graf:sta $fa
1320 ldx #>graf:stx $fb:inx:stx $fd
1330 lda #<graf+312:sta $fc
1340 lda #8:sta $14:lda #25:sta $15
1350 aa2 ldy #0:ldx #40
1360 lda ($fa),y:sta $2
1370 aa1 rol $2
1380 lda ($fc),y:sta $2:rol a:sta ($fc),y
1390 lda $fc:sec:sbc #8:sta $fc
1400 lda $fd:sbc #0:sta $fd
1410 dex:bne aa1
1420 lda $fc:clc:adc #65:sta $fc
1430 lda $fd:adc #1:sta $fd
1440 inc $fa:bne aa4:inc $fb
1450 aa4 dec $14:bne aa2
1460 lda $fc:clc:adc #56:sta $fc
1470 lda $fd:adc #1:sta $fd
1480 lda $fa:clc:adc #56:sta $fa
1490 lda $fb:adc #1:sta $fb
1500 lda #8:sta $14:dec $15:bne aa2
1510 rts
1520 ;################################
1530 ;### zyl. up scrolling ###
1540 ;################################
1550 up ldx #<graf:stx $fa:inx:stx $fc
1560 lda #>graf:sta $fb:sta $fd
1570 lda #<graf-313:sta $14
1580 lda #>graf-313:sta $15
1590 lda #40:sta $fe
1600 u4 ldx #24:ldy #0
1610 lda ($fa),y:pha
1620 u1 lda ($fc),y:sta ($fa),y
1630 iny:cpy #7:bne u1
1640 u3 lda $fa:clc:adc #64
1650 sta $fa:lda $fb:adc #1:sta $fb
1660 lda $fc:clc:adc #64
1670 sta $fc:lda $fd:adc #1:sta $fd
1680 lda $14:clc:adc #64
1690 sta $14:lda $15:adc #1:sta $15
1700 ldy #0:lda ($fa),y:sta ($14),y
1710 u2 lda ($fc),y:sta ($fa),y:iny
1720 cpy #7:bne u2:dex:bne u3
1730 dey:pla:sta ($fc),y
1740 lda $fa:sec:sbc #248:sta $fa
1750 lda $fb:sbc #29:sta $fb
1760 lda $fc:sec:sbc #248:sta $fc
1770 lda $fd:sbc #29:sta $fd
1780 lda $14:sec:sbc #248:sta $14
1790 lda $15:sbc #29:sta $15
1800 dec $fe:bne u5
1810 rts
1820 u5 jmp u4
1830 ;################################
1840 ;### zyl. down scrolling ###
1850 ;################################
1860 down ldx #<graf+7680:stx $fa:inx:stx $fc
1870 lda #>graf+7680:sta $fb:sta $fd
1880 lda #<graf+7994:sta $14
1890 lda #>graf+7994:sta $15
1900 lda #40:sta $fe
1910 d4 ldy #6:ldx #24
1920 lda ($fc),y:pha
1930 d1 lda ($fa),y:sta ($fc),y:dey
1940 bpl d1
1950 d3 lda $fa:sec:sbc #64
1960 sta $fa:lda $fb:sbc #1:sta $fb
1970 lda $fc:sec:sbc #64
1980 sta $fc:lda $fd:sbc #1:sta $fd
1990 lda $14:sec:sbc #64
2000 sta $14:lda $15:sbc #1:sta $15
2010 ldy #6:lda ($fc),y:sta ($14),y
2020 d2 lda ($fa),y:sta ($fc),y:dey
2030 bpl d2:dex:bne d3
2040 pla:ldy #0:sta ($fa),y
2050 lda $fa:clc:adc #8:sta $fa
2060 lda $fb:adc #30:sta $fb
2070 lda $fc:clc:adc #8:sta $fc
2080 lda $fd:adc #30:sta $fd
2090 lda $14:clc:adc #8:sta $14
2100 lda $15:adc #30:sta $15
2110 dec $fe:bne d5:rts
2120 d5 jmp d4