Accepting the danger of sounding somewhat arrogant, but you seem to
lack some basic knowledge of system programming. Are  you sure you
need assembler programming in the first place? Everything you've set
out so far is perfectly doable in C.

On Fri, 13 Jan 2023 at 17:35, Knedlik <kned...@trainmazeland.com> wrote:
>
> 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


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

Reply via email to