[comp.sys.ibm.pc] DOS Interrupts 1Eh and 2Eh

wew@naucse.UUCP (Bill Wilson) (03/24/88)

I am looking for information on two undocumented DOS interrupts.
1Eh and 2Eh are supposedly able to allow a programmer to change
the master environment, i.e. alter the path or setup strings of
the master and not the child process.  If you have any docs on
what registers etc. to fill to execute these interrupts please
send them to me or post them on the net.  I am especially
interested in their use from Turbo C.

Bill Wilson

wew@naucse.UUCP (Bill Wilson) (03/24/88)

If anyone can send me examples of linking assembly modules to Turbo C
I would appreciate it.  I can successfully link MS Fortran but the 
assembly is throwing me for a loop.  I either get function not found
errors on the link (following the poor examples in the manuals.) or 
if I do inline assembly I always get phase loop errors.

Any clues?

Bill Wilson

creps@silver.bacs.indiana.edu (Steve Creps) (03/25/88)

In article <615@naucse.UUCP> wew@naucse.UUCP (Bill Wilson) writes:

>If anyone can send me examples of linking assembly modules to Turbo C
>I would appreciate it.  I can successfully link MS Fortran but the 
>assembly is throwing me for a loop.  I either get function not found
>errors on the link (following the poor examples in the manuals.) or 
>if I do inline assembly I always get phase loop errors.

>Any clues?

   I'm not a Turbo C user, but did you remember to prepend an underscore
to the routine names in the ASM code?

-      -       -       -       -       -       -       -       -	-
Steve Creps on the 8650 runnin' Ultrix at Indiana University.
creps@silver.bacs.indiana.edu (192.12.206.2), ...iuvax!silver!creps,
creps@iubacs.bitnet "Hey fellas, it's a four-legged V-8!"

wew@naucse.UUCP (Bill Wilson) (03/26/88)

In article <1284@silver.bacs.indiana.edu>, creps@silver.bacs.indiana.edu (Steve Creps) writes:
> In article <615@naucse.UUCP> wew@naucse.UUCP (Bill Wilson) writes:
> 
> >If anyone can send me examples of linking assembly modules to Turbo C
> >I would appreciate it.  I can successfully link MS Fortran but the 
> >assembly is throwing me for a loop.  I either get function not found
> >errors on the link (following the poor examples in the manuals.) or 
> >if I do inline assembly I always get phase loop errors.
> 

I forgot to mention in my first article that I am prepending _
to the assembler entry points as shown in the Turbo C manual.  I am
also using public code and have tried most of the memory models.

Bill Wilson
 

ogilvie@cs.vu.nl (Ogilvie Robert Paul) (03/31/88)

The best way to see if the modules "find" each other is by inspecting
the load map (use /M with link). The later Microsoft linkers also use
upper/lowercase. Things to look out for are:

* identifier length don't match. Result is different identifiers
  (12 chars normal in object-files, 8 chars in 'C'-object modules)
  Thus truncate your identifiers.

* Upper and lower case mismatch. Result: different identifiers.
  Use commandline switches for the linker, or edit your names.

* See if C prepends underscores to names, and if then names are 8 or 9 chars.

Methodes to check:

* link each module separately and suppress library search (switch). The
  list of "unresolved externals" also shows the exact names expected.

* link & study the load map (link/M).

By the way, check the segments and their naming-conventions. General
C-segment names are TEXT, DATA and BSS plus a STACK (is normally high
end of BSS: addr 0= DATA, then BSS (unint'd data), then heap between
BSS and stack, then stack (grows down to heap).

Good luck,
Paul Ogilvie.