Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Devril

ASM & vc

This topic is 5865 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey all! Im trying to make an function that uses ASM, but evrytime I use an interrupt it crashes the program. For example: void MyFunction() { _asm { xor ax,ax mov ah,2ch int 21h } } this gets the current time, anyway, when it reaches the "int 21h", it crashes the program. Any sugestions? Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster

are you programming a dos console app?

Share this post


Link to post
Share on other sites
Ya, and win32 apps to!
Btw, ive been searching the net how to use ASM files in the vc, but I didnt find anything.

Share this post


Link to post
Share on other sites
I believe that x86 interrupts cannot be used in Windows programs. Not even in console applications. Don''t know if it''s an absolute fact...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Look here http://spiff.tripnet.se/~iczelion/ . It deals with win32 asm coding

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You cannot use int calls in Win32 apps. Console apps are still Win32 apps, just without a GUI. You can only use int''s in real DOS apps, which VC won''t generate.

You shouldn''t be using DOS int calls these days anyway. Learn how to do whatever you want to do using Win32 API calls.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
then you can do it simply on an old dos c compiler

Share this post


Link to post
Share on other sites
I think im going to read those tuts on the http://spiff.tripnet.se/~iczelion/ to see if I learn something!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!