git @ Cat's Eye Technologies SixtyPical / develop-0.17 eg / c64 / hearts.60p
develop-0.17

Tree @develop-0.17 (Download .tar.gz)

hearts.60p @develop-0.17

9235c6e
 
 
2fdba72
a9bd8a3
5549b83
9235c6e
a9bd8a3
 
 
9235c6e
a9bd8a3
 
 
9235c6e
a9bd8a3
// Displays 256 hearts at the top of the Commodore 64's screen.

// Define where the screen starts in memory:
byte table[256] screen @ 1024

define main routine
  // These are the values that will be written to by this routine:
  trashes a, x, z, n, screen
{
    ld x, 0
    ld a, 83    // 83 = screen code for heart
    repeat {
        st a, screen + x
        inc x
    } until z   // this flag will be set when x wraps around from 255 to 0
}