Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
News

PowerPC Assemblers? 33

tyler (asks) asks: "I asked many people, but nobody had an answer for me, so I figured i'd ask the most knowledgable people on the web: Does anyone know where i can get an assembly development environment for the PowerPC?"
This discussion has been archived. No new comments can be posted.

PowerPC Assemblers?

Comments Filter:
  • Your flattery will never work against me, mere mortal! You shall never uncover the coveted secrets of PPC asm environments! mhuahahaha!
    sleep deprivation kills
    dammit, i want vi keys in these windows
  • Metrowerks CodeWarrior [metrowerks.com], for the MacOS, will do inline PPC Asm. Motorola also made something of the sort, apparently, but its difficult to locate. Might wanna call the boys in Pheonix up and ask them.

    As for doing assembly for Linux/PPC, I'd ask the guys working on that project, or sniff around in their mailing list archives.
  • Since gcc needs an assembly backend, figure out what it uses (almost certainly gas) and use that. Environment? Emacs. :>
  • I think the best and easiest program to use is Fantasm. I have not used it in quite a while, but it appears that LightSoft is still updating their news page. Also, it appears a new game is in the works over there in the UK. Lightsoft [lightsoft.co.uk]
  • by Danta ( 2241 )
    Apple's free development environment MPW [apple.com] (Macintosh Programmer's Workshop) has an assembler tool. MPW is a scriptable, UNIX-like development environment.
  • Posted by Nick Carraway:

    Just download the GNU binutils and configure it for the appropriate host & target (in your case, probably host=Linux, target=PPC). Here's another hot tip -- they've got a couple of other packages you might be interested in: gcc & gdb, also available for a variety of different hosts and targets. Have fun...
  • This is a good way to go. A nice free PPC assembler. You may want to see the very excellent cross compiler FAQ:
    http://www.objsw.com/CrossGCC/

    Lots of info on how to build the tools for any target gcc supports.
  • Sure! See Codewarrior from metrowerks . They make a very good IDE-based compiler-editor-debugger system. It includes PPC assembler as part of the C/C++ system for PPC.

    Codewarrior also has compilers for Pascal, Java, etc. And it can target PPC, 68K, JRE, Wintel, and a number of embedded systems too.
  • cc1 translates the higher level language into an internal pcode, and then emits whatever format of assembler is required (AT&T PPC for instance)
  • I've heard nothing but horror stories about Fantasm. Surely there is something better out of the GNU project.

    --Lenny



    //"You can't prove anything about a program written in C or FORTRAN.
    It's really just Peek and Poke with some syntactic sugar."
  • Sure, today's compilers are fairly good, but they still aren't that close to the level of assembler hand-coded by a talented programmer. Can you write an 150-byte full-featured Tetris game in C? Didn't think so.
  • for the x86 assembly, I think you are looking for something more like:

    mov numone,ax
    add numtwo,ax
    mov ax,numone

    although the sources and destinations may need to be reversed. I don't think that x86 supports memory to memory operations directly.

    The professor's comment about RISC being impossible to program in assembly simply shows that he has not kept current with modern technology. There was a time, about 10 years ago, when machine code needed to be carefully scheduled in order to get the best performance on RISC architectures. The MIPS line of processors were famous for requiring odd transformations of code in order to avoid stalls due dependancies on branches, arithmetic evaluation and memory accesses. With modern RISC architectures, however, the need to reschedule machine code -- in order to handle branch delay slots for instance -- is greatly reduced and RISC machine code can again be written by mere mortals. (or at least demi-gods)

    - Jeff Dutky
  • Um... while gas ppc is possible, it's not incredibly pleasant.

    On the amiga, at least, there is a PPC assembler included in the StormC development environment for Haage&Partner's WarpOS system. It is a Macro Assembler, with syntax and functionality simlar to Amiga 68k Macro assembler ( i.e. C-like structures)

    Note that Motorola-syntax assembler for PPC defines a large number of macros that are very useful, and I find PPC assembler programming far less trying than the icky, tacked-together x86.

    NOT JUST FOR AMIGAS!!!
    The VBCC package includes PASM, a motorola-syntax ppc macro assembler, and is open source and written to be portable, in theory. (although vbcc is unlikely to supplant gcc in the near future).
    It can produce elf ppc binaries.

    PASM:
    [devnull.owl.de]
    http://devnull.owl.de/~frank/index_e.html

    haage-Partner

    www.haage-partner.com [haage-partner.com]


    go to amiga pages of
    www.uk.aminet.org [ic.ac.uk]
    or

    www.cucug.org/amiga.html [cucug.org]
    and search vbcc and PPC too, if you're curious.
  • From PASM readme :


    pasm is a portable assembler for the PowerPC processors of the 60x-series, written completely in ANSI-C. All PPC standard instructions, all 32-bit extended mnemonics
    and most of the 64-bit extended mnemonics are supported.

    pasm knows about nearly 50 directives. Among them are directives for macros, conditional assembly, include files, base-relative addressing (small data), etc..

    Currently, these output formats are available:

    Absolute. Raw format.
    ELF. 32-bit, PowerPC, big endian.
    Extended Hunk Format (EHF).
    Amiga DOS Format.
  • what ever it looks like, its got to be at least as fun as IBM/370 ASM ! (which has got to be the simplest ASM i've evered bothered with)
  • I wouldn't consider PPC assembly being difficult. Actually, learning it was much easier than I had expected. Sure it takes some time to think about all the scheduling issues, but you can gain a whole lot of efficiency. By the way, I was quite surprised about the relatively bad code generated by a commercial C compiler; I wouldn't agree with you in that respect.

    I had used the following texts to learn about PPC assembly:

    • Optimizing PowerPC Code: Programming the PowerPC Chip in Assembly Language [amazon.com] by Gary Kacmarcik. Somewhat outdated and currently out of print, but nevertheless a good introduction. You might be able to get it from a library.
    • IBM's documentation on PowerPC chips [ibm.com] is fairly technical, but I'd recommend it for serious programming. Very useful is the Programming Environment Manual (PEM) which you can download from that address.
    • There once was a useful document called "PowerPC Compiler Writer's Guide", which was published on www.chips.ibm.com [ibm.com]. They seem to have deleted it.
  • Anybody know where I can find an online guide to PPC assembler? I'm a broke student, and I don't think my university bookstore has any books on the subject...

    BTW, the newest version of CodeWarrior (v.5) can target Linux... Don't think it's released yet, though. Metrowerks has also announced CodeWarrior for Red Hat Linux. Although I don't have much experience with other compilers, CodeWarrior seems pretty good to me.
  • >> ...'cos apple sucks!

    *sigh* It's really sad to me that people resort to such comments. It's like some sort of weird racism (OSism, if you will).
    get over it.
    get over yourself.
    get over your near sightedness.
  • The PowerPC User Manuals can be ordered from both Motorola and IBM. Two years ago, they had mailed them to me without a charge. And you can download the stuff from chips.ibm.com [ibm.com].
  • I do a lot of work with PPC embedded processors... IBM 403Gx stuff. I really enjoy using an assembler by Alfred Arnold called ASL, which targets just about every processor ever made ;-) It supports macros and so forth, and works very well. For more info check out http://john.ccac.rwth-aachen.de:8000/as/as_EN.html

    As far as PPC assembler being usable, I enjoy it more than any other processor I've used, including x86, 680x0, AVR, PIC, HC11, etc. And it really isn't too bad to optimize either...

    Larry
  • Someone out there wrote the compilers which generate the RISC optimized code. I see far too many people out there thinking in terms of what they can get by with knowing, rather than seeking to know as much as they can. Obviously you can't know everything about everything, but you should try to know as much as you can about the things you do study and know something about as many different things as you can. I've met many people who were considered to be Guru's but who didn't know a damn thing about anything outside their specialty. Some people consider me to be a guru and it is in no small part due to the fact that I know something about just about everything computer wise. I can hold my own in discussions with software developers, hardware engineers, Mac freaks, Amiga lovers, networking experts, MCSE's etc. I don't know everything, but the wide range of what I do know comes in very handy and I can't tell you how many times something I learned while studying one thing was applicable to a vastly different thing later on. Understanding the instruction set of a processor gives you an insight into how that machine really works, it may be a subtle insight, but it can and will make a difference. Someone has to create the compilers that 99% of the rest of the developers will use. Last time I checked IBM and Motorola weren't developing GCC. Someone in the community has to understand these chips on that level, otherwise GCC and other free development tools will quickly become obsolete.
  • Answer: 10/15/98 -aao- there is a freeware assembler from motorola that runs on a
    windows nt platform at url:

    http://www.mot.com/SPS/PowerPC/products/software /sw_prod.html

    there are also demo versions of third party compilers available from

    metaware
    metrowerks
    diab data
    green hills

    the risc hotline has metaware demo copies. you could request a copy if you supply a mailing address one could be mailed to you.

    finally *unsupported* gnu is available at url:

    documentation: http://www.cygnus.com/pubs/gnupro/
    distribution list: http://www.delorie.com

Software production is assumed to be a line function, but it is run like a staff function. -- Paul Licker

Working...