2023-03-22 21:00:21 +00:00
|
|
|
%import textio
|
|
|
|
%import floats
|
|
|
|
%zeropage basicsafe
|
|
|
|
|
|
|
|
; Draw a mandelbrot in graphics mode (the image will be 256 x 200 pixels).
|
|
|
|
; NOTE: this will take an eternity to draw on a real c64. A CommanderX16 is a bit faster.
|
|
|
|
; even in Vice in warp mode (700% speed on my machine) it's slow, but you can see progress
|
|
|
|
|
|
|
|
; Note: this program is compatible with C64 and CX16.
|
|
|
|
|
2022-10-22 11:33:35 +00:00
|
|
|
main {
|
2023-03-22 21:00:21 +00:00
|
|
|
sub start() {
|
|
|
|
float xsquared = 2.0
|
|
|
|
float ysquared = 1.9
|
|
|
|
uword w = 1
|
|
|
|
ubyte h = 0
|
|
|
|
|
|
|
|
str name = ".tx2"
|
|
|
|
|
|
|
|
if name==".jpg" or name==".txt" or name==".gif" {
|
|
|
|
txt.print("yes")
|
|
|
|
}
|
|
|
|
|
|
|
|
; if w==0 or xsquared+ysquared<4.0 {
|
|
|
|
; txt.print("yes")
|
|
|
|
; }
|
|
|
|
|
|
|
|
; if w==0 {
|
|
|
|
; txt.print("w=0 ")
|
|
|
|
; }
|
|
|
|
; if h==0 {
|
|
|
|
; txt.print("h=0 ")
|
|
|
|
; }
|
|
|
|
; if w==0 or h==0 {
|
|
|
|
; txt.print(" w or h=0")
|
|
|
|
; }
|
2023-03-18 23:24:05 +00:00
|
|
|
}
|
2022-12-04 15:02:58 +00:00
|
|
|
}
|