1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-12-28 05:29:33 +00:00
8bitworkshop/presets/vicdual/minimal.c

36 lines
571 B
C
Raw Normal View History

2017-02-20 23:50:29 +00:00
#include <string.h>
typedef unsigned char byte;
typedef unsigned short word;
__sfr __at (0x40) palette;
byte __at (0xe000) cellram[32][32];
byte __at (0xe800) tileram[256][8];
void main();
2017-02-25 15:57:39 +00:00
// start routine @ 0x0
2017-02-20 23:50:29 +00:00
void start() {
__asm
LD SP,#0xE800 ; set up stack pointer
DI ; disable interrupts
__endasm;
main();
}
void main() {
byte x,y;
2017-02-25 15:57:39 +00:00
2017-02-20 23:50:29 +00:00
palette = 1;
memset(tileram, 0xfe, sizeof(tileram));
2017-02-25 15:57:39 +00:00
memset(cellram, 0, sizeof(tileram));
2017-02-20 23:50:29 +00:00
for (y=0; y<32; y++) {
for (x=0; x<32; x++) {
2017-02-25 15:57:39 +00:00
cellram[x][y] = (y<<3);
2017-02-20 23:50:29 +00:00
}
}
while (1) ;
}