Okay, this is just weird.
I can’t for the love of god figure out why this is throwing the divide by zero 
interrupt.

void setMCGA() {
    _asm {
        mov al, 0x13
        int 0x10
        ret
    }
}

void setText() {
    _asm {
        mov al, 0x03
        int 0x10
        ret
    }
}

void clearScreen(char color) {
    int i;
    for (i = 0xa000; i < 0xfa00; i++) {
        char* byte = i;
        *byte = color;
    }
}

int main(int argc, char** argv) {
    setMCGA();
    clearScreen(255);
    getchar();
    setText();
    return 0;
}



_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to