[comp.os.msdos.programmer] linking and memory models

jfjr@mbunix.mitre.org (Freedman) (01/24/91)

   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