// Demonstrates problem with passing struct pointer deref as parameter to call

const char* SCREEN = 0x0400;
char idx = 0;

struct Point {
    char x;
    char y;
};

void main() {
    struct Point point = { 1, 2 };
    struct Point* ptr = &point;
    print(*ptr);
}

void print(struct Point p) {
    SCREEN[idx++] = p.x;
    SCREEN[idx++] = p.y;
}