// Test a procedure with calling convention stack
// Test that comments are handled correctly

#pragma calling(__stackcall)

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

void main(void) {
    // Print "hello"
    print("hello", 1);
    // Print "world"
    print("world", 2);
}

void print(char* str, char spacing) {
    while(*str) {
        SCREEN[idx++] = *(str++);
        for(char c=0;c<spacing;c++)
            SCREEN[idx++] = ' ';
        }
}





