ASM in VISUAL C++
Here''s the problem (''cause of course, there IS a problem)
I am coding some simple routines in ASM, for instance, I call int 10h so that I can set up the video mode to my liking. Very simple, works perfect in Borland C++
Convert it to Visual C++, compile it, build it, run it, CRASH.
WTF is wrong with Visual ?
I read the MSDN and there are tons of articles and bug reports on how Visual C++ doesnt handle ASM routines very well.
HAs any one else got this kinda crap happening to them, and how did they work around it ?
The way I see it, I am gonna have to create a set of routines and get the .OBJ code with Borland, but I have no clue as to how to do that really ... anyone has ever ran into this kind of problem ?
Thanks.
youpla :-)
-----------------------------Sancte Isidore ora pro nobis !
Hi,
Basically your problem is that Visual C++ will only compile 32bit .exe''s for Protected mode Windows (ring 3). To use BIOS routines you can only safely do this in Dos (ring 0). Borland C++ can compile your app for Dos, which makes it safe to access the ''int 0xxh'' routines. Put another way ''int'' instructions are protected instructions in ring 3 mode (ie Windows).
If you know how to (or learn how to) write VxD''s for Windows you can access the int routines, because VxDs execute at ring 0 privelege, where there aren''t any protected instructions.
Hope this explains something about this problem,
Nick B.
PS. Oh yea, work arounds - learn DirectX to set video modes, access the frame buffer directly etc. (I like OpenGL better though)
Basically your problem is that Visual C++ will only compile 32bit .exe''s for Protected mode Windows (ring 3). To use BIOS routines you can only safely do this in Dos (ring 0). Borland C++ can compile your app for Dos, which makes it safe to access the ''int 0xxh'' routines. Put another way ''int'' instructions are protected instructions in ring 3 mode (ie Windows).
If you know how to (or learn how to) write VxD''s for Windows you can access the int routines, because VxDs execute at ring 0 privelege, where there aren''t any protected instructions.
Hope this explains something about this problem,
Nick B.
PS. Oh yea, work arounds - learn DirectX to set video modes, access the frame buffer directly etc. (I like OpenGL better though)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement