Path: 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 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)