🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Writing assembly procedures for higher level languages

#4349
From: ONG ENG TENG
Date: Thu, 24 Jan 1991 17:34
28 lines
2036 bytes
From article <1991Jan24.133054.8715@wpi.WPI.EDU>, by jhall@wpi.WPI.EDU (John Clinton Hall):
> AccordingtMicrosoft's _Mixed-Language Programming Guide_, "A procedure
> caled from any of the Microsoft high-level languages should preserve the
> values of SI, DI, SS, and DS (in additon to BP, which is already saved)." 
> However, does one need to save the ES register if it is mdified?  How abo
> the flags register?

I think the flags are "don't care", meaning return in indeterminate state.
You can always test it.  

Any how, I got a bone to pick with Microsoft C mixed-language
facility.  My department put down three hundred big ones for the 
compiler and interface seems not to work in a consistant way.  
When I finally got the C-main-program/Machine-assembler-subroutine to
work (both Microsoft) with a small size routine, I started to put a 
bigger assembler subroutine in (about 30k output code), but the
program failed, even after much debugging.  I have written 
nearly 1 meg of 8086 assembler (measured by output codes) with C 
as main program (Microsoft assembler, cheap $20 MIX C compiler), and
can always get them to work the way I want.  Can anyone comment
on working with C/Assembler interfacing with Microsoft C compiler and
Microsoft Assembler, and maybe speculate what I am doing wrong.  Also,
due to departmental decision, I have to use Turbo C and Turbo Assembler,
anyone's got any experience and thing to say?

Thanks in advance.

E. Teng Ong (ong@d.cs.okstate.edu) 
Technical Details
Message-ID: <1991Jan24.173453.4801@d.cs.okstate.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!dali.cs.montana.edu!ogicse!unmvax!uokmax!d.cs.okstate.edu!ong
References: <1991Jan24.133054.8715@wpi.WPI.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!dali.cs.montana.edu!ogicse!unmvax!uokmax!d.cs.okstate.edu!ong
From: ong@d.cs.okstate.edu (ONG ENG TENG)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Writing assembly procedures for higher level languages
Message-ID: <1991Jan24.173453.4801@d.cs.okstate.edu>
Date: 24 Jan 91 17:34:53 GMT
References: <1991Jan24.133054.8715@wpi.WPI.EDU>
Organization: Oklahoma State University
Lines: 28