Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!samsung!think.com!linus!linus!mbunix.mitre.org!jfjr From: jfjr@mbunix.mitre.org (Freedman) Newsgroups: comp.os.msdos.programmer Subject: linking and memory models Message-ID: <1991Jan24.131953.17289@linus.mitre.org> Date: 24 Jan 91 13:19:53 GMT References: <1991Jan23.013303.611@phoenix.pub.uu.oz.au> <1991Jan23.184840.7737@ariel.unm.edu> <1991Jan24.035352.6642@csusac.csus.edu> Sender: news@linus.mitre.org (RCF Linus News) Organization: The MITRE Corp., Bedford MA Lines: 20 Nntp-Posting-Host: mbunix.mitre.org I don't really understand the subtleties of memory models and linking. I could use some advice. I have MS C.60 on a compaq 386/20. I needed (and got) a one millesecond timer which is in assembler and is linked into working code. The working code consists of a driver program in C and some exisiting assembler. The C driver is compiled with /AH. Anyway my code works depending on the order in which it is linked - ie if the command is "link c-file old-file timer-file" works while "link c-file timer-file old-file " doesn't work. This has to be a problem of options vs memory-model vs near-far declarations. I just don't understand what. Any help would be appreciated. Jerry Freedman,Jr