[Help]Using BIOS interrupt 10h using inline asm crashes
I tried making an alt. cls other than using
system("cls");
so i made this, but it crashes when it is supposed to clear the screen.
[php]
//lets make the asm section live dabid !!
#include <iostream>
using namespace std;
void clearScr()
{
__asm
{
MOV AH,6h
MOV AL,0
MOV BH,7
MOV CH,0
MOV CL,0
MOV DH,24
MOV DL,79
INT 10h
}
}
int main()
{
cout << "Press enter to clear the screen using a BIOS interrupt\n";
cin.get();
/*------------------------------------------------*/
clearScr(); //crashes D:
/*------------------------------------------------*/
return 0;
}[/php]
system("cls");
so i made this, but it crashes when it is supposed to clear the screen.
[php]
//lets make the asm section live dabid !!
#include <iostream>
using namespace std;
void clearScr()
{
__asm
{
MOV AH,6h
MOV AL,0
MOV BH,7
MOV CH,0
MOV CL,0
MOV DH,24
MOV DL,79
INT 10h
}
}
int main()
{
cout << "Press enter to clear the screen using a BIOS interrupt\n";
cin.get();
/*------------------------------------------------*/
clearScr(); //crashes D:
/*------------------------------------------------*/
return 0;
}[/php]


