1 // As long as we stay in the first segment, we won't have to deal with the crazy segments.
2 unsigned char *fb
= (unsigned char *) (128 * 1024);
3 unsigned long cursor_x
= 0;
4 unsigned long cursor_y
= 0;
5 long int point_x
, point_y
;
10 for (i
= 0; i
< 10 * 480; ++i
)
12 cursor_y
= cursor_x
= point_x
= point_y
= 0;
15 static inline void point(long int x
, long int y
)
17 unsigned char *p
= fb
+ (x
>> 3) + y
* (640/8);
21 static inline void moveto(long int x
, long int y
)
27 void drawto(long int x
, long int y
)
32 from
= y
, to
= point_y
;
34 from
= point_y
, to
= y
;
36 for (i
= from
; i
<= to
; ++i
)
39 } else if (y
== point_y
) {
41 from
= x
, to
= point_x
;
43 from
= point_x
, to
= x
;
45 for (i
= from
; i
<= to
; ++i
)
51 void a(long int), b(long int), c(long int), d(long int);
54 long int h
, x
, y
, x0
, y0
;
59 d(i
-1); x
-= h
; drawto(x
,y
);
60 a(i
-1); y
-= h
; drawto(x
,y
);
61 a(i
-1); x
+= h
; drawto(x
,y
);
69 c(i
-1); y
+= h
; drawto(x
,y
);
70 b(i
-1); x
+= h
; drawto(x
,y
);
71 b(i
-1); y
-= h
; drawto(x
,y
);
79 b(i
-1); x
+= h
; drawto(x
,y
);
80 c(i
-1); y
+= h
; drawto(x
,y
);
81 c(i
-1); x
-= h
; drawto(x
,y
);
89 a(i
-1); y
-= h
; drawto(x
,y
);
90 d(i
-1); x
-= h
; drawto(x
,y
);
91 d(i
-1); y
+= h
; drawto(x
,y
);
96 #define IOSPACE ((volatile int *) 0x1000000000000ULL)
97 #define set_fbaddr0(x) IOSPACE[21] = (x)
108 for (d
= 0; d
<= 6; ++d
) {
112 h
= h0
; x0
= h
/2; y0
= x0
; h
= h
/ 2;
113 x0
+= h
/2; y0
+= h
/2;
115 x
= x0
+ 400; y
= y0
+ 350; moveto(x
,y
);
118 for (i
= 0; i
< 1000000; ++i
)