projects
/
xscreensaver
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
http://www.jwz.org/xscreensaver/xscreensaver-5.13.tar.gz
[xscreensaver]
/
hacks
/
images
/
m6502
/
dragon-fractal.asm
1
;; dmsc
2
;;
3
;; PostPosted: Thu Dec 13, 2007 11:57 pm Post subject: Dragon curve
4
;; fractal
5
;;
6
;;
7
;; Hi!
8
;;
9
;; This draws the dragon curve fractal (really a "twin dragon"):
10
11
lda #0
12
sta $0
13
14
lop:
15
lda $0
16
sta $1
17
lda #3
18
sta $6
19
lda #232
20
sta $5
21
22
ldx #0
23
lpN:
24
lsr $1
25
bcc nos
26
lda $5
27
clc
28
adc tL,x
29
sta $5
30
lda $6
31
adc tH,x
32
sta $6
33
nos:
34
inx
35
lda $1
36
bne lpN
37
inx
38
txa
39
ldy #0
40
sta ($5),y
41
42
inc $0
43
bne lop
44
rts
45
46
tL:
47
dcb 32, 31, 254, 190, 128, 132, 8, 8
48
tH:
49
dcb 0, 0, 255, 255, 255, 255, 0, 1