[comp.sys.mac.programmer] Segment Loading

mfort@ub.d.umn.edu (Michael Fort) (03/02/91)

Here is what I am trying to do...

Launch a file from a Turbo Pascal (sorry LSP users) application using the
_Launch trap macro.  Obviously it as an assembly only routine.  Sooo, I was
going to use a simple freeware assembler to write a subroutine of code to be
called from Turbo.  I could then include the code resource in the resource
fork as a CODE resource, and load it in.

1) Can I just load it in through resource manager calls, or
2) Is there a segment loader routine that does this?

I would really appreciate any sample code for using the _Launch trap to
launch a file by name (and possibly heirarchical).  Also, any such sample
code using the resource from Turbo would be great!

Two last inquisitions...

1) How do you stop the damn squeeking of a Mac Plus keyboard, and
2) How would you cast a pointer to a code resource to a function in TP?

Am I asking too much ?!?!
Thank you ahead of time,
Mike Fort

Please send email perferably to mfort@ub.d.umn.edu

ksand@Apple.COM (Kent Sandvik) (03/02/91)

In article <963@ub.d.umn.edu> mfort@ub.d.umn.edu (Michael Fort) writes:

>I would really appreciate any sample code for using the _Launch trap to
>launch a file by name (and possibly heirarchical).  Also, any such sample
>code using the resource from Turbo would be great!

Tech Note #126 gives an example in Pascal and C how to launch processes.
System 7 will have a better organized way to achive this - with the
help of the new Process Manager (yep, now we have global process IDs !).

Kent

-- 
Kent Sandvik, Apple Computer Inc, Developer Technical Support
NET:ksand@apple.com, AppleLink: KSAND  DISCLAIMER: Private mumbo-jumbo
Zippy++ says: "C++ was given to mankind, so that we might learn patience"