From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,6c2e360bdf4f292b X-Google-Attributes: gidfee84,public X-Google-Thread: 1164f8,6c2e360bdf4f292b X-Google-Attributes: gid1164f8,public From: hobbs@steven.zko.dec.com (Steve Hobbs) Subject: Re: Alpha Assembler??? Date: 1996/05/12 Message-ID: <4n5k3a$k96@zk2nws.zko.dec.com>#1/1 X-Deja-AN: 155174030 distribution: world references: <4mvcnd$1i@fstgal00.tu-graz.ac.at> organization: Digital Equipment Corporation reply-to: hobbs@steven.zko.dec.com (Steve Hobbs) newsgroups: comp.unix.osf.osf1,comp.sys.dec In article <4mvcnd$1i@fstgal00.tu-graz.ac.at>, schinagl@edvz.tu-graz.ac.at (Hermann Schinagl) writes: >A few days ago I read the alpha architectural maunal, because I have >do so a view lines of code in alpha assembly language. I have done a >lot of assembly language programming on other plattforms, and this is >my first try on Alpha, so I need your assistance: > >1) What a about a processor stack? I couldn't find a stack to which > I can push, and where I can pop from. > ( Even in the architectural manual) > >2) How do C compilers generate the code for calling a subroutine? > Normaly the arguments are pushed to a stack, and > the called procedure takes the arguments from the stack. > I couldn't find something similar. > >3) What about the 't*' registers I found in the disassembly of > code, a GNU C compiler generated. There is no reference > to 't*' registers in my architectural manual The Alpha Architecture Reference Manual gives the definition of the Alpha hardware. However, rules about the using the stack, passing parameters, and the uses allowed of the various hardware registers are part of the software architecture. OpenVMS, Digital Unix, and Windows NT use slightly difference software conventions. In order to write assembly code you will need to read the software conventions for the OS you plan to run on. You seem to be using Digital Unix so I recommend you get a copy of the DEC OSF/1 Calling Standard for AXP Systems, order number AA-PY8AB-TE. This will give all the rules for Digital Unix. You may also want to get a copy of the DEC OSF/1 Assembly Language Programmer's Guide, order number AA-PS31C-TE. (The above titles and order numbers correspond to the DEC OSF/1 Version 3.0 release. I assume that new titles and order numbers will be shortly available when Digital Unix Version 4.0 ships.)