Home▸
Forums▸
Wanted: A List of Macintosh Toolbox A-Line Traps.▸
Wanted: A List of Macintosh Toolbox A-Line Traps.
Thread
Wanted: A List of Macintosh Toolbox A-Line Traps.
I am having a LOT of fun picking around in these ROMs. I was trying to extract the easter egg images from the Mac SE ROM, and I've hit a bump in the road. There are a few A-Line Trap instructions, which essentially allow your program to use some low-level subroutines provided by Apple.
I don't completely understand how these work though. For example, I've run into a call to _UnpackBits (instruction A8D0). The ROM code pushes a couple things onto the stack before this call. However, I'm not sure how this _UnpackBits thing works, nor where it's code is located in ROM.
I know that there is a "compressed A-line table" located at $0001 AA9C in the SE ROM. I believe that this is a vector (aka double-jump) table. So in theory, you should hit an A-line code, 68000 raises an invalid opcode interrupt, jumps to this table, then jumps again to the actual trap implementation. (We've all seen when this fails - "Unimplemented trap"!) But I'm not sure how this works. And how it says the table is "compressed" sounds daunting.
Has anyone had any experience with these strange A-line traps? Is there a spec somewhere that describes each A-Line instruction? I have found a listing of A-Lines but no descriptions.
I don't completely understand how these work though. For example, I've run into a call to _UnpackBits (instruction A8D0). The ROM code pushes a couple things onto the stack before this call. However, I'm not sure how this _UnpackBits thing works, nor where it's code is located in ROM.
I know that there is a "compressed A-line table" located at $0001 AA9C in the SE ROM. I believe that this is a vector (aka double-jump) table. So in theory, you should hit an A-line code, 68000 raises an invalid opcode interrupt, jumps to this table, then jumps again to the actual trap implementation. (We've all seen when this fails - "Unimplemented trap"!) But I'm not sure how this works. And how it says the table is "compressed" sounds daunting.
Has anyone had any experience with these strange A-line traps? Is there a spec somewhere that describes each A-Line instruction? I have found a listing of A-Lines but no descriptions.
Might not have the jump instructions, just addresses. There are some features of 68k addressing modes that make that feasible.
Oh, I forgot... you may want to disassemble the A-line trap handler. This is the code the 68k CPU calls when you call an A-line instruction. I believe it is located at address 0x30. Note that just the address is given at 0x30.
There is a tool called CodeWriter (I know, not an original name) that documents the Toolbox, including the A-line traps, thoroughly. I used it heavily when I was still coding in MacMETH.
This documentation sounds exactly like what I need. I can't find CodeWriter though. Google is notoriously bad for finding old stuff like that. Do you have any idea where I might find this?There is a tool called CodeWriter (I know, not an original name) that documents the Toolbox, including the A-line traps, thoroughly. I used it heavily when I was still coding in MacMETH.
Actually, I think I may still have it in my archives. Can you accept a gopher link?
I haven't used the Gopher protocol before but I believe I can figure it out. It looks like there's an add-on for Firefox that will allow me to do it. Send away!Actually, I think I may still have it in my archives. Can you accept a gopher link?
Firefox can handle gopher links directly (at least currently -- see bug 388195). However, if you are referring to the OverbiteFF extension, I can endorse it wholeheartedly.
(The reason: I wrote it.) OverbiteFF patches some gaps in Fx's gopher support, so it's all good.
Anyway, I have created a by-request folder on the gopher server, so grab it out of
gopher://gopher.floodgap.com/1/archive/by-request/classic-mac
It's a very handy tool.
(The reason: I wrote it.) OverbiteFF patches some gaps in Fx's gopher support, so it's all good.Anyway, I have created a by-request folder on the gopher server, so grab it out of
gopher://gopher.floodgap.com/1/archive/by-request/classic-mac
It's a very handy tool.
Thanks I got it. I'll have a look at it a little later. The Mac I'm on is PPC, but I just discovered it does not have an OS 9 System Folder.Firefox can handle gopher links directly (at least currently -- see bug 388195). However, if you are referring to the OverbiteFF extension, I can endorse it wholeheartedly.(The reason: I wrote it.) OverbiteFF patches some gaps in Fx's gopher support, so it's all good.
Anyway, I have created a by-request folder on the gopher server, so grab it out of
gopher://gopher.floodgap.com/1/archive/by-request/classic-mac
It's a very handy tool.
The Universal Headers has a list of the documented ones in Traps.h.
You can look in other header files for the prototypes of the calls.
You can look in other header files for the prototypes of the calls.
Thanks for the info.