Difference between revisions of "K65 Tutorial 1"
From KK's Wiki
m |
|||
Line 1: | Line 1: | ||
+ | [[Category:K65]] | ||
<source lang="c"> | <source lang="c"> | ||
/* | /* |
Revision as of 00:09, 16 December 2014
/* * Tutorial 01 - simple raster bar animation * * */ var anim = 0x80; // RAM address alias // entry point block is declared with "main" main { init // function/inline call (defined in _defs.k65) { sync1 // enter overscan (yes, we start here from end of display) // some free time here sync2 // trigger VSYNC // more free time here sync3 // display field start x=224 // that's LDX y=anim // and that's LDY { wsync // inline again, this time wait for horizontal blank cbg=y // STY y++ // INY x-- // DEX }!= // repeat (jump) if not zero/not equal (flag Z=0) cbg=a=0 // "p=q=r" is a shortcut for "q=r p=q" for any p/q/r anim++ // INC } always // loop forever (jump) }