🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.mac
Article #6803

Re: Init Resources in another file...

#6803
From: Werner Uhrig
Date: Fri, 15 Aug 1986 05:41
87 lines
4815 bytes
In article <96900032@uiucuxc>, dorner@uiucuxc.CSO.UIUC.EDU writes:
> 
> /* Written 11:26 am  Aug  7, 1986 by werner@ut-ngp.UUCP in net.micro.mac */
> >
> >> Obviously SOMETHING is different  when  the  INIT  resources  are
> >> external to the System, but  this  SHOULD  not  be the case.  Any
> >> ideas or other experiences?
> >
> >when I saw the announcement of this new feature, I was very happy also, and
> >tried to make use of it to avoid having to install the Tecmar resources
> >every time ....  it didn't work!  I don't know why yet.
> 
> I must have missed something--I, too, would really like to use this, but
> have never heard of it before.  Would one of you in the know please post
> the gory details on how to do this?


[ from Technical Note #57:  Macintosh Plus Overview in the Dec. 1985 SS, p. 18 ]

	INIT Mechanism

When the system starts up, it looks for files with types INIT and RDEV in the
system folder.  If it finds any, it looks in those files for resoources of type
INIT.  If it finds any of those, it executes them.



[ from the December 1985S Software Supplement Additions - ERRATA, page 5 ]

	Installer Script doesn't install DSAT 0 and INIT 31

The current Macintosh Plus installation script "Mac Plus Update" doesn't install
resouces DSAT 0 or INIT 31.  Thus disks that have been updated with that
installation script comes up with "Disassembler Installed" when booting from
the HD20 and never laods any file-based INITs.

Note: as describe in the enclosed Technical Note 57 under INIT-mechanism,
INIT 31 in the System file looks for files of file type INIT at boot time
and executes INIT resources in any that it finds, allowing for driver
installation at boot time without modification to the System file.  An
installer script which installs INIT 31 correctly and additional information
about this INIT 31 mechanism should be available in the near future.  Developers
who wish to make use of this INIT 31 mechanism should check for updates on one
of the Macintosh developers' bullitin [sic] boards (on services such as
CompuServe [MAUG], Delphi, GENIE, BIX, or MacQueue) or write to:
Macintosh Technical Support, Apple Computer MS 3-T, 20525 Mariani Av.,
Cupertino CA 95014,  ATTN: INIT 31 Installer.



[ from Technical Note #14, release June '86 ]

Ever since the first Macintosh System Update, Apple has tried to dissuade
developers from writing to the System File. We found that some third-party
installation utilities tended to somehow corrupt the System File, making it
difficult for us to update our system software there.

Since then, we've been working on ways to help developers avoid writing to the
System File, such as Font/DA Mover, the Installer and INIT 31.

	What is INIT 31?

In the Macintosh Plus System File, we added a new INIT resource (INIT
resources are resources containing code which are loaded and run at boot
time by the system startup code). INIT number 31 is one of the last to be
executed by the startup code. It looks at all the other files in the System
folder for files whose type is "INIT"; when it finds one, it opens it and
checks for resources of type INIT. If any exist, it loads and JSR's to them,
before closing the resource file and looking for the next one.

This allows you to create a single file, containing your driver and INIT,
which a user can simply drag into the System folder without having to run
an installer. To un-install your software, the user simply drags your
software out of the System folder.

	How to write an INIT 31

INIT resources are resources containing executable code, beginning with the
first byte of the resource. An INIT resource is not locked down by the code
that loads it, so the "locked" bit in its resource attributes should be set.
Also, if it is desired that the INIT's code remain in memory "permanently",
the INIT must call DetachResource to detach itself, so that it will not be
disposed of when its resource file is closed.

[ there were 3 further sections, titled: "How to write an INIT 31",
  "Boot-time Driver Number Arbitration", and "Allocating "Permanent" Memory"
  but I'll leave that to someone else to "quote" ---Werner ]
Technical Details
Message-ID: <3802@ut-ngp.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!ut-sally!ut-ngp!werner
References: <4657@decwrl.DEC.COM> <96900032@uiucuxc>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!ut-sally!ut-ngp!werner
From: werner@ut-ngp.UUCP (Werner Uhrig)
Newsgroups: net.micro.mac
Subject: Re: Init Resources in another file...
Message-ID: <3802@ut-ngp.UUCP>
Date: Fri, 15-Aug-86 01:41:57 EDT
Article-I.D.: ut-ngp.3802
Posted: Fri Aug 15 01:41:57 1986
Date-Received: Fri, 15-Aug-86 06:33:25 EDT
References: <4657@decwrl.DEC.COM> <96900032@uiucuxc>
Organization: UTexas Computation Center, Austin, Texas
Lines: 87
Summary: INIT 31, *NEARLY ALL* the official poop follows ...