mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-08-09 04:25:12 +00:00
17 lines
298 B
C
17 lines
298 B
C
// Minimal struct - modifying pointer to struct in memory using arrow operator
|
|
|
|
struct Point {
|
|
byte x;
|
|
byte y;
|
|
};
|
|
|
|
struct Point* points = 0x1000;
|
|
|
|
void main() {
|
|
points->x += 5;
|
|
points->y += 5;
|
|
|
|
const byte* SCREEN = 0x0400;
|
|
SCREEN[0] = points->x;
|
|
SCREEN[1] = points->y;
|
|
} |