Jump to content
  • Advertisement

Archived

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

DoomAddict

Assembler Causes Crashes

This topic is 6876 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

Guest Anonymous Poster
Yup thats a really big problem you should punch the computer several times in rapid succession in order to get the thing to work. If it does not work, punch the monitor several times in rapid sucession. It that still doesnt work, send it all back to the computer sotre to get it repaired from the punching and popefully by then it should work.

FAGary http://fagary.cjb.net

Share this post


Link to post
Share on other sites
Advertisement
what type of app are you buliding? if you are building a win32-type (even if it's console style) app then it most likely won't work at all since windows won't let you call 'em interrupts.

however, if you compile as some sort of dos executable, then it should work fine (provided your interrupt calls are correct [i didn't check those.... i assume they're right ])

hope that helps!

~Queasy.

Share this post


Link to post
Share on other sites
Hey! I wrote that article.
Now here is the problem:
In win32 or DPMI applications you can't call real-mode interrupts.

Try searching in the helpfile for something like int86x or dpmi_int.
Or use an MS-DOS realmode compiler.

Share this post


Link to post
Share on other sites
Queasy is on the right track. Except ... VC6 does not do DOS apps at all. You will need to get an older compiler, or go grab a free one.

No Interrupts in Win32. There are some minor exceptions ... but that is way beyond what you are trying to do.

My advice ... if you want to program for Windows ... follow my article series here on GameDev. Part 2 should be up in a few days. However, if you still want to do DOS go get the A86 assembler (freeware), or find an old version of MASM or even TASM.

- Chris

Share this post


Link to post
Share on other sites
You're kidding???

VC6 does NOT do dos apps??? WHAT!?

So is it strictly a win32 compiler? It does nt right?

//i use wc11.0 which compiles for many platforms...

Share this post


Link to post
Share on other sites
Thaks a lot for all your help, I think I figured it out though. First VC6 on my computer can only make Win 32 progs, I think there are addons that can make it make pure dos progs, somewhere on the microsoft website. I was looking through the help file, and I could not find those registers anywhere. What has happened I think, is that they changed the registers to work with Win 32. With all due respect to the person who wrote the assembler tutorial, I think it is a little outdated. From what I can make of it, the new registers are the same as the old ones except with an E in front of them EAX, EAH and so on...

Thanx for all of your help

Share this post


Link to post
Share on other sites
I've just started DPMI programming (already quite experienced), that's because it's so outdated.

I will update my article then.

Share this post


Link to post
Share on other sites
bosjoh, you mention you can't call realmode interrupts in DPMI applications. does this mean that the extender handles interrupts transparently to the application? even if you use a software interrupt called via asm file?

it's because i'm having problems with a 32bit dos app, when calling an interrupt to set the video mode (vbe 2.0). my instinct tells me it's a segment register assumed wrongly or something, which causes the interrupt to execute garbage code and soon after, crash.

the weird thing is, sometimes it works, sometimes it doesn't (a successful compile & link produces and executable that always works or always crashes). i've traced the crash to "int 10h" in the function that sets the video mode. and yes, the video mode is valid at the point where the interrupt is called. as i said, my instinct says it's wrongly assumed segment registers (since the interrupt executes in v86 mode, it relies on CS, DS, SS and stuff...) but how the hell do you fix this? (or even detect it)

i can send the source files if someone thinks they might know the solution or wants to investigate further (at this point, it's all or nothing, so i don't care if some of these files have code that i otherwise wouldn't give out). the compiler is watcom v11.0 and the assembler is TASM 4.1 (could just use WASM if you want). one file, vgovbe20.asm is not written by me (and it contains the mode setting code and crash, go figure)

(crash on line 593 of vgovbe20.asm)

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!