1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-11-27 05:49:28 +00:00
SixtyPical/eg/demo.60p

111 lines
1.6 KiB
Plaintext
Raw Normal View History

2014-04-04 14:45:49 +00:00
assign byte table screen $0400
2014-04-02 13:24:43 +00:00
assign byte table screen2 1274
assign byte table screen3 1524
assign byte table screen4 1774
assign byte table colormap 55296
assign byte table colormap2 55546
assign byte table colormap3 55796
assign byte table colormap4 56046
assign byte vic_border 53280
assign byte table vic_bg 53281
assign vector cinv 788
reserve vector save_cinv
2014-04-02 20:37:23 +00:00
assign word position $fb
2014-04-02 16:48:44 +00:00
reserve byte value
2014-04-02 20:37:23 +00:00
reserve word m
reserve word n
2014-04-02 16:48:44 +00:00
2014-04-02 20:37:23 +00:00
routine reset_position {
2014-04-02 16:48:44 +00:00
lda #$00
2014-04-02 20:37:23 +00:00
sta <position
2014-04-02 16:48:44 +00:00
lda #$04
2014-04-02 20:37:23 +00:00
sta >position
2014-04-02 16:48:44 +00:00
}
routine increment_pos {
clc
2014-04-02 20:37:23 +00:00
lda <position
2014-04-02 16:48:44 +00:00
adc #1
2014-04-02 20:37:23 +00:00
sta <position
lda >position
2014-04-02 16:48:44 +00:00
adc #0
2014-04-02 20:37:23 +00:00
sta >position
2014-04-02 16:48:44 +00:00
}
2014-04-04 15:16:51 +00:00
routine compare_16_bit {
lda >m
cmp >n
if beq {
lda <m
cmp <n
} else {
}
}
2014-04-02 16:48:44 +00:00
routine compare_pos {
2014-04-02 20:37:23 +00:00
lda <position
sta <m
lda >position
sta >m
2014-04-02 16:48:44 +00:00
lda #$07
2014-04-02 20:37:23 +00:00
sta >n
2014-04-02 16:48:44 +00:00
lda #$e8
2014-04-02 20:37:23 +00:00
sta <n
2014-04-02 16:48:44 +00:00
jsr compare_16_bit
}
2014-04-02 13:24:43 +00:00
routine clear_screen {
ldy #0
repeat bne {
lda #1
sta colormap, y
sta colormap2, y
sta colormap3, y
sta colormap4, y
lda #32
sta screen, y
sta screen2, y
sta screen3, y
sta screen4, y
iny
cpy #250
}
}
2014-04-04 15:16:51 +00:00
routine our_cinv {
inc value
lda value
2014-04-04 15:16:51 +00:00
ldy #0
sta (position), y
jsr increment_pos
jsr compare_pos
if beq {
jsr reset_position
} else {
}
jmp (save_cinv)
}
routine main {
lda #5
sta vic_border
lda #0
sta vic_bg
jsr reset_position
jsr clear_screen
sei {
copy cinv save_cinv
copy routine our_cinv to cinv
}
clc
repeat bcc { }
}