Assembler Causes Crashes

Started by
12 comments, last by DoomAddict 24 years, 7 months ago
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

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 )<P>hope that helps!<P>~Queasy.

Jonathan Makqueasy gamesgate 88[email=jon.mak@utoronto.ca]email[/email]
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.

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

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...

Jonathan Makqueasy gamesgate 88[email=jon.mak@utoronto.ca]email[/email]
I kid about many things ... this is not one of them.

- Chris

Good work, Queasy, i'm using Watcom too
my watcom stuff: http://codexorg.webjump.com

------------------
FlyFire/CodeX
http://codexorg.webjump.com

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

DoomAddict
WHAT CAN I SAY, DOOM STARTED IT!!!!
:o
I've just started DPMI programming (already quite experienced), that's because it's so outdated.

I will update my article then.

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)

This topic is closed to new replies.

Advertisement