Article View: comp.std.c
Article #4433Help!! porting DOS to Windows 3.1
From: Jack T. Hess
Date: Thu, 07 Dec 1995 17:40
Date: Thu, 07 Dec 1995 17:40
45 lines
1205 bytes
1205 bytes
I have a problem. I have an assembly module that works fine in DOS, but crashes under Windows. Here is the DOS version: Call from "C": int far func(int parm1,int parm2,int parm3,int parm4,int parm5, int parm6, void *buffer); func.asm: LOCALS .286 .MODEL LARGE .CODE PUBLIC _func _func PROC FAR push bp mov bp,sp parm1 EQU [BP+6] parm2 EQU [BP+8] parm3 EQU [BP+10] parm4 EQU [BP+12] parm5 EQU [BP+14] parm6 EQU [BP+16] buffer EQU [BP+18] ; buffer (far data) . . . ( manipulate the data) . ret _func ENDP END I think my problem might be related to calling convention for placing parameters on the stack. Does Windows force PASCAL calling convention? Can I force CDECL parameter passing? Any help would be appreciated.!!! Thanks in advance Jack jhess@airmail.net
Technical Details
Message-ID:
<4a793g$i71@news-f.iadfw.net>Path:
arc1-ca.pugleaf.net!news-f.iadfw.net!usenetShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news-f.iadfw.net!usenet From: jhess@airmail.net (Jack T. Hess) Newsgroups: comp.std.c Subject: Help!! porting DOS to Windows 3.1 Date: Thu, 07 Dec 1995 17:40:59 GMT Organization: Internet America Message-ID: <4a793g$i71@news-f.iadfw.net> NNTP-Posting-Host: dal13-17.ppp.iadfw.net X-Newsreader: Forte Free Agent 1.0.82