2015-10-18 17:54:28 +00:00
|
|
|
// Displays 256 hearts at the top of the Commodore 64's screen.
|
|
|
|
|
|
|
|
// Define where the screen starts in memory:
|
2018-03-06 10:32:52 +00:00
|
|
|
byte table[256] screen @ 1024
|
2015-10-18 17:32:20 +00:00
|
|
|
|
2018-09-09 13:01:38 +00:00
|
|
|
define main routine
|
2015-10-18 17:54:28 +00:00
|
|
|
// These are the values that will be written to by this routine:
|
2015-10-18 17:32:20 +00:00
|
|
|
trashes a, x, z, n, screen
|
|
|
|
{
|
|
|
|
ld x, 0
|
2015-10-18 17:54:28 +00:00
|
|
|
ld a, 83 // 83 = screen code for heart
|
2015-10-18 17:32:20 +00:00
|
|
|
repeat {
|
|
|
|
st a, screen + x
|
|
|
|
inc x
|
2015-10-18 17:54:28 +00:00
|
|
|
} until z // this flag will be set when x wraps around from 255 to 0
|
2015-10-18 17:32:20 +00:00
|
|
|
}
|