From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,1435e364be523e9d X-Google-Attributes: gid1164f8,public From: carlini@krakar.enet.dec.com (Antonio Carlini) Subject: Re: Alpha Assembly Programming Date: 1997/11/11 Message-ID: <64918p$34r$1@nntpd.lkg.dec.com>#1/1 X-Deja-AN: 288510544 References: <34622F8E.7529@dso.org.sg> <63s25m$7v7$1@nntpd.lkg.dec.com> <34621aeb.0@news.wizvax.net> Reply-To: carlini@nowhere.you.can.reach.com Distribution: world Organization: Digital Equipment Corporation Newsgroups: comp.sys.dec In article <34621aeb.0@news.wizvax.net>, wilson@dbit.com (John Wilson) writes: |>In article <63s25m$7v7$1@nntpd.lkg.dec.com>, |>Antonio Carlini wrote: |>>|>I am planning to hand code some C programs in assembler on the Alpha |>>|>chip. Can anyone point me to any useful resources that I can refer to? |>> |>>Why? Unless you are doing something that *cannot* be done in C (like |>>PALcode) then a compiler is highly likely to do a much better job than |>>you will. |> |>WHY can't anyone ever just answer a question like this, without feeling |>that it's their job to talk the person out of doing what they want?! Who's |>to say this person can't get the hang of doing Alpha instruction scheduling |>by hand? And in any case did they even say they expected to do a better |>job than the compiler? Maybe they just want to do it for fun. Sheesh... Doing assembler on a modern RISC CPU is not quit the same as when I was hacking on a Z80 or 68000. He obviously has the routines available in C, so I can only presume that he wants the stuff to run faster. Why else take an existing HLL routine and rewrite in assembler? With enough effort he can get the hang of EV4 instruction scheduling, and then learn about how EV5 scheduling. EV6 is going to hit the streets soon - out of order execution should keep him busy for a while! So I'm not trying to talk him out of it: I'm just pointing out that if his intention is to make it go faster by coding "nearer the hardware" then perhaps he should reconsider. If he just wants to know more about the chip then that's fine (laudable even). And yes, assembler can be fun in small doses :-) |> |>In any case, for the Alpha the Architecture Handbook is a good place to |>start -- depending on the phase of the moon, you might even get it for free |>if you figure out whom to ask. You're unlikely to find any real textbooks on |>assembly language programming for the newer CPUs because these days everyone |>has convinced themselves there's no point. But the data sheets for the |>various individual CPU models can provide more detailed information about |>semantics, scheduling etc. for those particular CPUs. Note that compilers |>generally produce code that's optimized for one particular model at a time. |> The Alpha Architecture Handbook is available at: http://ftp.europe.digital.com/pub/digital/DECinfo/semiconductor/ literature/alphahb2.pdf (that's one URL) and the Digital Unix Assembly Language Programmer's Guide will help too. Other than that I don't know of any resources. -- Antonio Carlini Mail: carlini@marvin.enet.dec.com DECnet-Plus for OpenVMS Engineering Digital Equipment Corporation Worton Grange, Reading, England (Reply-To: address mangled in header)