// Demonstrates problem with passing struct array element as parameter to call

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

struct Point {
    char x;
    char y;
};

struct Point[2] points;

void main() {
    points[0] = { 1, 2 };
    points[1] = { 3, 4 };
    for ( char i: 0..1) {
        print(points[i]);
    }
}

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