Path: utzoo!attcan!uunet!mcvax!nikhefh!gert From: gert@nikhefh.hep.nl (Gert Poletiek) Newsgroups: comp.sys.atari.st Subject: Re: To Fix or Not To Fix (Really: applying patches to OS) Message-ID: <530@nikhefh.hep.nl> Date: 23 Aug 88 17:29:04 GMT References: <635@ihnet.ATT.COM> <383@snjsn1.SJ.ATE.SLB.COM> <1224@netmbx.UUCP> <524@nikhefh.hep.nl> <4582@saturn.ucsc.edu> Reply-To: gert@nikhefh.hep.nl (Gert Poletiek) Organization: Nikhef-H, Amsterdam (the Netherlands). Lines: 67 In article <4582@saturn.ucsc.edu> koreth@ssyx.ucsc.edu (Steven Grimm) writes: >In article <524@nikhefh.hep.nl> gert@nikhefh.hep.nl (Gert Poletiek) writes: >>Look at the way things are organized in the Macintosh OS. All system traps >>are routed by a trap address table (just like in GemDos). The subtle >>difference with GemDos is that the trap address table is located somewhere in >>RAM, not ROM. (Well, it is copied from ROM to RAM at system boot time). > >The ST's trap vectors are in RAM, too. In fact, I don't know of *ANY* 68xxx >box that doesn't have them in RAM. Their locations are down in low memory >($60 or thereabouts, I don't remember exactly...) You have to be in supervisor >mode to write to them, but they can certainly be changed. I've done it lots >of times. > >>The Mac OS has two calls (GetTrapAddress and SetTrapAddress) which get and >>set a trap vector in the traps table (resp). > >Try looking up Setexc() in your XBIOS manual. > >--- >These are my opinions, and in no way reflect those of UCSC, which are wrong. >Steven Grimm Moderator, comp.{sources,binaries}.atari.st >koreth@ssyx.ucsc.edu uunet!ucbvax!ucscc!ssyx!koreth OK, OK I did not make my point very clear. (And Yes, I do know 680X0 boxes that have their trap handler addresses in a ROM). What I meant is this: In the Macintosh OS calls are implemented by whole lotta line A trap numbers. This takes one single word in a program in order to call the OS. The trap word looks like 0xaXXX, where the XXX represent the number of the system call actually requested by the caller. It is this 12 bit number that is used as index into an array of pointers THAT'S THE TRAP ROUTINE ADDRESS TABLE I MEANT IN THE ORIGINAL POSTING. This array of pointers to OS routines is located in RAM on the Macintosh. So what the OS routines GetTrapAddress and SetTrapAddress actually do is returning (for Get) an entry from the array of function pointers or modifying (for Set) one single entry in this array. FLAME ON Of course I know the Setexc() call: but its essentially different from Get/SetTrapAddress in the Mac! FLAME OFF The whole idea behind all this is that they (Apple) can now apply patches to roms from the 'system' file. (I think it's the PTCH resources in it). They don't have to order a whole new shipment of ROMS when a bug is discovered. They can just replace the erroneous OS routine. If Atari would do things this way (and I doubt there is any look/feel involved) you could easily work with different versions of Malloc() in the same system. Gert Poletiek NIKHEF-H, Dutch National Institute for Nuclear and High Energy Physics Kruislaan 409, P.O.Box 41882, 1009 DB Amsterdam, The Netherlands UUCP: {decvax,cernvax,unido,seismo}!mcvax!nikhefh!gert bitnet: nikhefh!gert@mcvax.bitnet, U00025@hasara5.bitnet From september 1st 1988: Gert Poletiek Dept. of Math. and Computing Science, University of Amsterdam, Kruislaan 409, NL-1098 SJ Amsterdam, The Netherlands UUCP: {decvax,cernvax,unido,seismo}!mcvax!uva!gert bitnet: uva!gert@mcvax.bitnet, U00025@hasara5.bitnet