|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
D - asm, access violation?
Hi,
I'm trying to set the cursor position using inline asm, i came up with the
following nifty function, the program compiles, however when i call the function
i get an "Error: Access Violation". Any ideas on what might be wrong?
void GotoXY (ubyte x, ubyte y)
{
asm {
mov AH, 2; /* cursor position */
mov DH, y;
mov DL, x;
mov BH, 0; /* video page #0 */
int 0x10;
}
}
Apr 29 2004
i ran that code in C++ and it does the same thing, it throws when int 0x10 is called. Maybe thats a protected instruction? I dont really know much about the int instruction sorry :( (what does it do anyway?) In article <c6qlmd$omq$1 digitaldaemon.com>, LightEater says... Apr 29 2004
In article imr1984 says...i ran that code in C++ and it does the same thing, it throws when int 0x10 is called. Maybe thats a protected instruction? I dont really know much about the int instruction sorry :( (what does it do anyway?) Apr 29 2004
LightEater wrote: Apr 29 2004
"LightEater" <LightEater_member pathlink.com> wrote in message news:c6qlmd$omq$1 digitaldaemon.com...I'm trying to set the cursor position using inline asm, i came up with the following nifty function, the program compiles, however when i call the Apr 29 2004
|