2020-08-31 21:00:53 +00:00
|
|
|
; CommanderX16 simple graphics example!
|
2020-08-28 19:42:53 +00:00
|
|
|
|
2020-09-09 20:49:32 +00:00
|
|
|
%target cx16
|
2020-08-28 19:42:53 +00:00
|
|
|
%zeropage basicsafe
|
|
|
|
|
2020-10-06 23:35:23 +00:00
|
|
|
|
2020-08-28 19:42:53 +00:00
|
|
|
main {
|
|
|
|
|
|
|
|
sub start() {
|
|
|
|
|
2020-08-29 21:55:26 +00:00
|
|
|
void cx16.screen_set_mode($80)
|
2020-08-28 19:42:53 +00:00
|
|
|
cx16.r0=0
|
2020-10-06 23:35:23 +00:00
|
|
|
void cx16.screen_set_mode(0)
|
2020-08-28 19:42:53 +00:00
|
|
|
|
2020-08-28 23:44:20 +00:00
|
|
|
cx16.FB_init()
|
2020-09-23 00:34:49 +00:00
|
|
|
cx16.GRAPH_init()
|
2020-08-28 23:44:20 +00:00
|
|
|
cx16.r0 = 0
|
|
|
|
cx16.r1 = 0
|
|
|
|
cx16.FB_cursor_position()
|
2020-09-23 00:34:49 +00:00
|
|
|
ubyte color
|
|
|
|
repeat 320*199 {
|
|
|
|
cx16.FB_set_pixel(color)
|
|
|
|
color++
|
2020-08-28 19:42:53 +00:00
|
|
|
}
|
2020-08-28 23:44:20 +00:00
|
|
|
|
2020-09-23 00:34:49 +00:00
|
|
|
uword xx
|
2020-08-29 21:55:26 +00:00
|
|
|
for xx in 0 to 319 step 32 {
|
|
|
|
ubyte q
|
|
|
|
for q in 0 to 31 {
|
|
|
|
cx16.GRAPH_set_colors(q, 2, 0)
|
|
|
|
cx16.r0 = xx+q
|
|
|
|
cx16.r1=0
|
|
|
|
cx16.r2=rnd()
|
|
|
|
cx16.r3=199
|
|
|
|
cx16.GRAPH_draw_line()
|
|
|
|
}
|
|
|
|
}
|
2020-08-28 19:42:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|