// Test effective live range and register allocation
// Here main::c, outsw::c and outw::c can all have the same allocation

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

void main() {
    for(char c: 0..39 ) {
        outsw(c);
    }
}

void outsw(char c) {
    out('-');
    outw(c);
}

void outw(char c) {
    out(c<<4);
    out(c&0x0f);
}

void out(char c) {
    idx++;
    SCREEN[idx] = c;
}