Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Learning Assembly Language

Learning Assembly Language
Thread Tools
Forum Regular
Join Date: Dec 2000
Location: Rehoboth Beach,DE USA
Status: Offline
Reply With Quote
Aug 25, 2001, 09:41 PM
 
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
Reply With Quote
Aug 26, 2001, 04:40 PM
 
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.
Spectral Class
"Shedding Light on Innovation"
     
Fresh-Faced Recruit
Join Date: Jul 2001
Location: Rehoboth Beach DE
Status: Offline
Reply With Quote
Aug 26, 2001, 09:49 PM
 
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
Reply With Quote
Aug 27, 2001, 02:20 AM
 
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.
Spectral Class
"Shedding Light on Innovation"
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Aug 27, 2001, 01:34 PM
 
I'm pretty sure there's a reference over at http://www.mot.com somwhere
     
Dedicated MacNNer
Join Date: Jan 2001
Location: Boulder, CO, USA
Status: Offline
Reply With Quote
Aug 27, 2001, 09:08 PM
 
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
Reply With Quote
Aug 31, 2001, 09:26 AM
 
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.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:51 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2