K65 Tutorial 1
From KK's Wiki
Revision as of 13:56, 11 December 2014 by Krzysiek (Talk | contribs) (Created page with "<source lang="c" tabwidth="0" style="tab-size: 4;"> →* Tutorial 01 - simple raster bar animation * *: var anim = 0x80; // RAM address alias // entry point block is dec...")
/* * 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) }