https://wiki.preterhuman.net/index.php?title=NeXTSTEP_68k_trap_types&feed=atom&action=historyNeXTSTEP 68k trap types - Revision history2024-03-29T11:41:55ZRevision history for this page on the wikiMediaWiki 1.35.0https://wiki.preterhuman.net/index.php?title=NeXTSTEP_68k_trap_types&diff=8632&oldid=prevNetfreak: Created page with "=Question= <pre> I'm looking for a list and description of the various traps used by NeXTstep/68k. As far as I can see, traps nr. 3, 4, 5 and 6 are used. Trap 4 is used for s..."2019-07-15T02:19:31Z<p>Created page with "=Question= <pre> I'm looking for a list and description of the various traps used by NeXTstep/68k. As far as I can see, traps nr. 3, 4, 5 and 6 are used. Trap 4 is used for s..."</p>
<p><b>New page</b></p><div>=Question=<br />
<pre><br />
I'm looking for a list and description of the various traps used<br />
by NeXTstep/68k.<br />
<br />
As far as I can see, traps nr. 3, 4, 5 and 6 are used. Trap 4 is<br />
used for system calls - what are the other traps used for?<br />
</pre><br />
<br />
=Response=<br />
<pre><br />
some parts of the puzzle are solved - trap #3 calls Mach<br />
functions with the number specified in d0 as an index into<br />
the mach_trap_table. If the number in d0 is negative, some<br />
processing concerning ast's (asynchronous system traps) seems<br />
to occur - I'll have to read up on this.<br />
<br />
Traps #5 and #6 just retrieve resp. set a long value at offset 0x50<br />
in a structure (perhaps a struct pcb) pointed to by an element <br />
(pointer at offset 0x24) of active_threads (which seems to be a <br />
struct task *). Without a description of the struct itself, this <br />
will be difficult to decode. From the use in some binaries (cp, sh),<br />
this is some kind of pointer, but I don't have a clue what this<br />
points to... some setjmp()/longjmp() stuff perhaps?<br />
</pre><br />
<br />
<br />
[[Category:NeXT]]</div>Netfreak