 |
 |
Learning Assembly Language
|
 |
|
 |
|
Forum Regular
Join Date: Dec 2000
Location: Rehoboth Beach,DE USA
Status:
Offline
|
|
Does anyone know of any good books/online docs/tutorials pertaining to learning assembly language on the Mac,especially concerning the G3 and G4 processors.At this point I know nothing.Any info would be greatly appreciated.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status:
Offline
|
|
I don't do any of it myself but here is some AltiVec page I was sifting through the other day:
<A HREF="http://"http://www.lightsoft.co.uk/Fantasm/avec_prog.html"" TARGET=_blank>http://www.lightsoft.co.uk/Fantasm/avec_prog.html</A>
Realistically, though, AltiVec is probably the only reason why you should program assembly code for an OS like OS X. I don't know what you are doing though so why listen to me.
Have fun and post some of it if you get a chance (this stuff interests me as well),
Jeff.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jul 2001
Location: Rehoboth Beach DE
Status:
Offline
|
|
Thanks for the info.I'm learning assembly language so that I can decrypt stack traces,debug programs,and optimize functions,that sort of thing.I also want to know how the stack and the registers really work-I don't plan to get heavily into it,I like high level OO languages a lot better than lower level languages,or any type of procedural language.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status:
Offline
|
|
I see. As far as I know, the G3 and G4 each have 32 32-bit integer registers and 32 64-bit FP registers. The G4 has an additional 32 128-bit vector registers (per AltiVec unit). That is about all I can tell you about PPC assembly that I know, personally. Any other low-level work I have done was with x86 or DLX.
Wish I could be of more assistance,
Jeff.
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jan 2001
Location: Boulder, CO, USA
Status:
Offline
|
|
Originally posted by 4.669:
<STRONG>Thanks for the info.I'm learning assembly language so that I can decrypt stack traces,debug programs,and optimize functions,that sort of thing.</STRONG>
Oh, you mean to hack.
I have a couple of books on the PowerPC architecture. They were passed down in an office fire-sale here, so just because I have them doesn't mean I actually use them or know if they're any good, but:
PowerPC, A Practical Companion
Steve Heath
ISBN 0750618019
Programming the PowerPC
Dan Parks Sydow
ISBN 1558514007
The former looks pretty good. Has an ISA reference, and discusses pipelines, caches, etc, up to the 603. Most of it will probably still be relevant to G4 programming, but no AltiVec. There are probably also more recent editions, or more recent books in general. (Hmmm... I could stand to use this more often, actually...)
The latter looks like a guide to porting your 68k Mac app to PPC. Probably not as useful.
Incidentally, there are high-level altivec libraries provided by Apple. You don't need to go to assembly to use altivec.
If you're starting from ground zero, a book on general computer architecture might be helpful, too. Computer Organization and Design by Hennessy and Patterson is a good one ... or at least, the one I dabbled in at school.  That course was perhaps the most useful one I ever took, and I'm just a vanilla OO programmer.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Oct 2000
Status:
Offline
|
|
Hi Rick1138
Nice to hear you want to learn assembly language!
At Motorola there are some big manuals about the PowerPC architecture, but they're rather a reference than a tutorial. They describe the commands and the processor. From Apple you get the "OS X Runtime Conventions" which describes the use of registers, stack etc. in OS X. Make sure you check this out.
I know PPC assembly quite well and do a lot of work with it, so if you like you can email me ( engicool@yahoo.com ), and maybe I can answer your questions.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|