Assembler Causes Crashes

Started by
12 comments, last by DoomAddict 24 years, 6 months ago
I think there is a 'simulate real-mode call' function for dpmi.
[oops forgot to tell you the interrupt! 0x31 is the int]

ax=0x300
bl=interrupt number you want to call
cx=words to copy from pm stack to rm stack... so i guess you pass params that way.
es:edi -> is the call structure with all your params...
byte desc
===========
0x0 edi
0x4 esi
ox8 ebp
oxc reserved
ox10 ebx
ox14 edx
.. ecx
.. eax
0x20 flags
0x22 es
0x24 ds
0x26 fs
ox28 gs
ox2a ip
ox2c cs
ox2e sp
ox30 ss

after you call.. .this struct will be filled with return values too.

*I THINK* so i may be (might be, mostly likely am?) wrong

[This message has been edited by Queasy (edited September 20, 1999).]

Jonathan Makqueasy gamesgate 88[email=jon.mak@utoronto.ca]email[/email]
Advertisement
To make things clear:
You can't call real-mode interrupts directly with DPMI. But there is a 'simulate real mode interrupt' function (search the compiler's help file).

Using registers in DPMI is also different.
ax, bx, cx and dx becomes eax, ebx, ecx and edx.
These are 32 bit instead of 16 bit.

The memory mode is flat so realmode programmers: forget about the segment offset.

You can't write for example directly to adres 0xA0000 (0xA000:0=0xA0000). You must first map the memory and add the segment base offset.

Hope this will help out all DPMI programmers.

Foofightr: I've sent an E-mail to you.

[This message has been edited by bosjoh (edited September 21, 1999).]

[This message has been edited by bosjoh (edited September 21, 1999).]

I am having this problem with assembler code. I am following an assembler tutorial from http://skyscraper.fortunecity.com/compiler/379/assemble.html, and my computer keeps locking up(the computer does not actually lock up, but the screen goes black, and stays that way), when trying to display a white pixel at (100,100) under 320 X 200 X 256. I know that this probably is not the place where to post this, but it's the only place that I can think of.
I am using VisualC++6, and this is the code:

int main()
{
__asm {
MOV AH, 0
MOV AX, 19
INT 10h

MOV AH, Ch
MOV CX, 100
MOV DX, 100
MOV AL, 15
INT 10h

MOV AH, 0
MOV AX, 3
INT 10h

}

return 0;
}

Any ideas about what's happening?
Thanx

------------------
DoomAddict
WHAT CAN I SAY, DOOM STARTED IT!!!!
:o

DoomAddict
WHAT CAN I SAY, DOOM STARTED IT!!!!
:o
Here is the file containing all the source of the program in question:

Mapedit ... hmm, click this link, it will tell you page not available. enter the same url again and it'll work.

for watcom 11. buildmap.bat is for building the release version, and debugmap.bat to build the debug version.

FYI on my computer, it crashes on line 593 of vgovbe20.asm (not written by me!)

thanks for any help (i still say it's a problem with segment registers for when it executes realmode code for the INT 10H)

[This message has been edited by foofightr (edited September 21, 1999).]

This topic is closed to new replies.

Advertisement