1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-08-09 04:25:12 +00:00
Files
kickc/src/test/kc/struct-ptr-13.kc
2019-06-15 19:17:55 +02:00

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;
}