🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #1835

Re: Calling .ASM from .C ?

#1835
From: Cliff Lum
Date: Wed, 08 Aug 1990 22:08
16 lines
981 bytes
If you have Masm 5.1 you should have the documentation for mixed language
programming which will tell you how to call an ASM program from C.
If you use the new segemnt directives which I know will work with Microsoft C.
You would go DOSSEG
.MODEL SMALL,C          ;depending on the model required
                        ;the C sets up the stack for proper returns
.CODE
PUBLIC  hello
hello   PROC
        ...
        code
        ret
hello   ENDP

If yopu do not use the masm simplified directive you have save the bp register
on the stack and it depends on the model you use.
Technical Details
Message-ID: <2775@mindlink.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!samsung!zaphod.mps.ohio-state.edu!wuarchive!decwrl!ucbvax!van-bc!rsoft!mindlink!a50

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!samsung!zaphod.mps.ohio-state.edu!wuarchive!decwrl!ucbvax!van-bc!rsoft!mindlink!a50
From: a50@mindlink.UUCP (Cliff Lum)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Calling .ASM from .C ?
Message-ID: <2775@mindlink.UUCP>
Date: 8 Aug 90 22:08:44 GMT
Organization: MIND LINK! - British Columbia, Canada
Lines: 16