Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CON
- _clkmode = xtal1 + pll16x
- _xinfreq = 5_000_000
- OBJ
- text : "vga_text"
- VAR
- Long PaintSpace[32]
- Byte xPos, yPos, xMod, yMod
- Pub Main
- cognew(Paint, @PaintSpace)
- xPos := 12
- yPos := 12
- xMod := 1
- yMod := 1
- repeat
- if xPos < 1 or xPos > 30
- xMod := xMod * -1
- if yPos < 1 or yPos > 13
- yMod := yMod * -1
- xPos := xPos + xMod
- yPos := yPos + yMod
- waitcnt((clkfreq / 40) + cnt)
- Pub Paint
- text.start(8)
- repeat
- text.out(0)
- text.out(10)
- text.out(xPos)
- text.out(11)
- text.out(yPos)
- text.out(15)
- waitcnt((clkfreq / 100) + cnt)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement