xIII
Registered: Nov 2008 Posts: 210 |
.pc = $0801 "Basic Upstart"
:BasicUpstart(start)
.pc = $0810 "intro"
// -------------------------------------------------------------- VARIABLES
.var rl1 = $32
.var rl2 = $32+8*12
// -------------------------------------------------------------- START
start: ldx #0
lda #$00
!l: sta $d800,x
sta $d900,x
sta $da00,x
sta $dae8,x
inx
bne !l-
sei
ldx #0
stx $d020
stx $d021
inx
stx $d01a
stx $d019
lda #$7f
sta $dc0d
and $d011
sta $d011
lda #<irq1
sta $fffe
lda #>irq1
sta $ffff
lda #$35
sta $01
lda #rl1
sta $d012
cli
!loop: lda $dc01
cmp #$ef
bne !loop-
lda #$37
sta $01
jsr $fce2
wait: rts
irq1: sta $02
stx $03
sty $04
lsr $d019
ldx #6
dex
bne *-1
ldy #88
!loop: lda raster1,y // 4
sta $d020 // 4
lda raster2,y // 4
sta $d021 // 4
lda raster1,y // 4
sta $d021 // 4
lda raster2,y // 4
sta $d021 // 4
lda raster1,y // 4
sta $d021 // 4
lda raster2,y // 4
sta $d021 // 4
lda $d012 // 4
and #%00000111 // 2
sta $d011 // 4
dey // 2
bpl !loop- // 3
lda #<irq2 sta $fffe
lda #>irq2 sta $ffff
ldx #rl2 stx $d012
lda $02
ldx $03
ldy $04
rti
irq2: sta $02
sta $03
sta $04
lsr $d019
ldx #5
dex
bne *-1
lda #$1b sta $d011
lda #5 sta $d020
lda #6 sta $d021
lda #20 sta $d018
lda #$c8 sta $d016
jsr showtxt
lda #<irq1 sta $fffe
lda #>irq1 sta $ffff
lda #rl1 sta $d012
lda $02
ldx $03
ldy $04
rti
.align $100
raster1:
.byte 00,06,00,06,04,00,06,04,14,00,06,04,14,03,00,06
.byte 04,14,03,01,03,14,04,06,00,03,14,04,06,00,14,04
.byte 06,00,04,06,00,06,00,00,00,00,00,00,00,00,00,00
.byte 00,06,00,06,04,00,06,04,14,00,06,04,14,03,00,06
.byte 04,14,03,01,03,14,04,06,00,03,14,04,06,00,14,04
.byte 06,00,04,06,00,06,00,00,00,00,00,00,00,00,00,00
.byte 09,02,02,09,00,02,08,08,02,00,08,10,10,08,00,10
.byte 07,07,10,00,07,01,01,07,00,10,07,07,10,00,08,10
.byte 10,08,00,02,08,08,02,00,09,02,02,09,00,00,00,00
.byte 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
.byte 09,02,02,09,00,02,08,08,02,00,08,10,10,08,00,10
.byte 07,07,10,00,07,01,01,07,00,10,07,07,10,00,08,10
.byte 10,08,00,02,08,08,02,00,09,02,02,09,00,00,00,00
.byte 00,09,00,09,02,00,09,02,08,00,09,02,08,07,00,09
.byte 02,08,07,01,07,08,02,09,00,07,08,02,09,00,08,02
.byte 09,00,02,09,00,09,00,00,00,00,00,00,00,00,00,00
raster2:
.byte 00,09,00,09,02,00,09,02,08,00,09,02,08,07,00,09
.byte 02,08,07,01,07,08,02,09,00,07,08,02,09,00,08,02
.byte 09,00,02,09,00,09,00,00,00,00,00,00,00,00,00,00
.byte 00,09,00,09,02,00,09,02,08,00,09,02,08,07,00,09
.byte 02,08,07,01,07,08,02,09,00,07,08,02,09,00,08,02
.byte 09,00,02,09,00,09,00,00,00,00,00,00,00,00,00,00
.byte 00,06,00,06,04,00,06,04,14,00,06,04,14,03,00,06
.byte 04,14,03,01,03,14,04,06,00,03,14,04,06,00,14,04
.byte 06,00,04,06,00,06,00,00,00,00,00,00,00,00,00,00
.byte 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
.byte 00,09,00,09,02,00,09,02,08,00,09,02,08,07,00,09
.byte 02,08,07,01,07,08,02,09,00,07,08,02,09,00,08,02
.byte 09,00,02,09,00,09,00,00,00,00,00,00,00,00,00,00
.byte 00,06,00,06,04,00,06,04,14,00,06,04,14,03,00,06
.byte 04,14,03,01,03,14,04,06,00,03,14,04,06,00,14,04
.byte 06,00,04,06,00,06,00,00,00,00,00,00,00,00,00,00
showtxt:
ldx #0
!loop: lda txt,x
sta $0400+17*40,x
inx
bne !loop-
rts
txt: .text "this is an example text, i hope it will be visible "
.text "some more text to fill this part of the screen "
.text "i can even add more text but it stops eventually "
.text "it seems i have like 256 bytes of text available "
.text "greets to you dear reader :) i still have some bytes to filllllllllllll"
|