2024-08-23 17:00:12 +00:00
|
|
|
%import monogfx
|
|
|
|
%import textio
|
|
|
|
%import math
|
|
|
|
|
|
|
|
%option no_sysinit
|
2024-10-12 00:56:36 +00:00
|
|
|
%zeropage basicsafe
|
2024-10-08 19:25:37 +00:00
|
|
|
|
2024-08-23 17:00:12 +00:00
|
|
|
|
2024-10-07 17:17:37 +00:00
|
|
|
main {
|
2024-08-23 17:00:12 +00:00
|
|
|
|
2024-10-08 19:25:37 +00:00
|
|
|
sub start() {
|
2024-08-23 17:00:12 +00:00
|
|
|
monogfx.lores()
|
|
|
|
demofill()
|
|
|
|
}
|
|
|
|
|
|
|
|
sub demofill() {
|
|
|
|
const uword offsetx = 0
|
|
|
|
const uword offsety = 0
|
|
|
|
|
|
|
|
monogfx.circle(offsetx+160, offsety+120, 110, true)
|
|
|
|
monogfx.rect(offsetx+180, offsety+5, 25, 190, true)
|
|
|
|
monogfx.line(offsetx+100, offsety+150, offsetx+240, offsety+10, true)
|
|
|
|
monogfx.line(offsetx+101, offsety+150, offsetx+241, offsety+10, true)
|
|
|
|
monogfx.rect(offsetx+150, offsety+130, 10, 100, true)
|
|
|
|
|
|
|
|
sys.wait(30)
|
|
|
|
|
|
|
|
cbm.SETTIM(0,0,0)
|
|
|
|
monogfx.fill(offsetx+100,offsety+100,true)
|
|
|
|
monogfx.fill(offsetx+100,offsety+100,false)
|
|
|
|
uword duration = cbm.RDTIM16()
|
|
|
|
sys.wait(30)
|
|
|
|
|
|
|
|
monogfx.textmode()
|
|
|
|
txt.nl()
|
|
|
|
txt.print_uw(duration)
|
|
|
|
txt.print(" jiffies\n")
|
|
|
|
|
|
|
|
; before optimizations: ~166 jiffies
|
|
|
|
|
2024-10-07 18:39:49 +00:00
|
|
|
}
|
2024-09-14 21:17:26 +00:00
|
|
|
}
|