[comp.sys.mac.programmer] Forever.

earleh@eleazar.dartmouth.edu (Earle R. Horton) (11/18/88)

     The following comment is from {MPW}AIncludes:Traps.a in the MPW v
2.0.2 distribution.  It discusses a dozen traps which were formerly
defined reduntantly as both Toolbox and OS traps.  As of System 6.0,
this is no longer true.  Any attempt to use the Toolbox version of any
of these traps gets you a SysError(12). (Unimplemented core routine.)
Seems like this is worth a TechNote or something.

;The following twelve OS traps have been redundantly defined as
;Tool traps as well. They should be
;accessed as OS traps, but their slots in the Tool trap table
;will be reserved forever.
;	$1A GetZone
;	$1B SetZone
;
;	$1D MaxMem
;	$1E NewPtr
;
;	$22 NewHandle
;	$23 DisposHandle
;	$24 SetHandleSize
;	$25 GetHandleSize
;
;	$29 HLock
;	$2A HUnLock
;
;	$32 FlushEvents
;
;	$4C CompactMem
Earle R. Horton. 23 Fletcher Circle, Hanover, NH 03755
(603) 643-4109
Sorry, no fancy stuff, since this program limits my .signature to three

darin@Apple.COM (Darin Adler) (11/19/88)

In article <10978@dartvax.Dartmouth.EDU> earleh@eleazar.dartmouth.edu (Earle R. Horton) writes:
>      The following comment is from {MPW}AIncludes:Traps.a in the MPW v
> 2.0.2 distribution.  It discusses a dozen traps which were formerly
> defined reduntantly as both Toolbox and OS traps.  As of System 6.0,
> this is no longer true.  Any attempt to use the Toolbox version of any
> of these traps gets you a SysError(12). (Unimplemented core routine.)
> Seems like this is worth a TechNote or something.
> 
> ;The following twelve OS traps have been redundantly defined as
> ;Tool traps as well. They should be
> ;accessed as OS traps, but their slots in the Tool trap table
> ;will be reserved forever.

This was really not intended for outside developers and was really a note
to remind engineers at Apple of this annoying compatibility hack.  There were a
few buggy applications, around the time of introduction of the Mac Plus, that
used the Toolbox trap numbers to access these traps. For compatibility, they
were left pointing to the appropriate traps until 6.0. It was a *very* bad
idea to use these, though (and an equally bad idea to document them), since the
patches made by INITs, MultiFinder, etc. to these traps were made only to
the OS trap versions, and not to these Toolbox shadows.

The traps were removed in 6.0 as a prelude to reuse of the trap numbers for
normal purposes.

I don't really think a Technical Note is necessary. It was never documented
or mentioned anywhere except in the MPW Traps.a file and was not useful
information, in any case.
--
Darin Adler					       AppleLink: Adler4
UUCP: {sun,voder,nsc,mtxinu,dual}!apple!darin	  CSNET: darin@Apple.com