2024-08-23 17:33:20 +00:00
|
|
|
%import gfx2
|
2024-06-01 13:03:01 +00:00
|
|
|
%import textio
|
2024-08-23 17:33:20 +00:00
|
|
|
%import math
|
|
|
|
|
2024-06-29 13:41:39 +00:00
|
|
|
%option no_sysinit
|
2024-07-15 22:25:29 +00:00
|
|
|
%zeropage basicsafe
|
2023-12-31 00:02:33 +00:00
|
|
|
|
2024-07-21 11:35:28 +00:00
|
|
|
|
2024-01-07 17:48:18 +00:00
|
|
|
main {
|
2024-08-22 20:54:38 +00:00
|
|
|
|
2024-08-24 12:34:23 +00:00
|
|
|
sub start() {
|
2024-08-23 17:33:20 +00:00
|
|
|
gfx2.screen_mode(2)
|
|
|
|
demofill()
|
2024-08-24 12:34:23 +00:00
|
|
|
}
|
2024-08-22 20:54:38 +00:00
|
|
|
|
2024-08-23 17:33:20 +00:00
|
|
|
sub demofill() {
|
|
|
|
gfx2.circle(160, 120, 110, 1)
|
|
|
|
gfx2.rect(180, 5, 25, 190, 2)
|
|
|
|
gfx2.line(100, 150, 240, 10, 2)
|
|
|
|
gfx2.rect(150, 130, 10, 100, 3)
|
|
|
|
|
|
|
|
sys.wait(30)
|
2024-08-22 20:54:38 +00:00
|
|
|
|
2024-08-24 12:34:23 +00:00
|
|
|
cbm.SETTIM(0,0,0)
|
2024-08-23 17:33:20 +00:00
|
|
|
gfx2.fill(100,100,3)
|
|
|
|
gfx2.fill(100,100,2)
|
|
|
|
gfx2.fill(100,100,0)
|
|
|
|
uword duration = cbm.RDTIM16()
|
|
|
|
sys.wait(30)
|
|
|
|
|
|
|
|
gfx2.screen_mode(0)
|
2024-08-24 12:34:23 +00:00
|
|
|
txt.nl()
|
2024-08-23 17:33:20 +00:00
|
|
|
txt.print_uw(duration)
|
|
|
|
txt.print(" jiffies\n")
|
|
|
|
|
|
|
|
; hires 4c before optimizations: ~345 jiffies
|
2024-08-22 20:54:38 +00:00
|
|
|
|
2024-07-21 11:35:28 +00:00
|
|
|
}
|
|
|
|
}
|