Assembling and linking on a Sparc

  1. Log into a Sparc machine:
    Telnet to <machine>.engr.uconn.edu, where <machine> is one of the following:
    ultra1, ultra2, ultra3, ultra4, ultra5, ultra6, ultra7, ultra8, cs-ultra5-1, cs-ultra5-2, cs-ultra5-3, cs-ultra5-4, cs-ultra5-5, cs-ultra5-6, cs-ultra5-7, cs-ultra5-8, banana, cherry, parsely, rosemary, thyme, mork. There are others.

  2. Copy your program from Windows to your Z: drive, or write your program under Unix using an editor like Emacs.

  3. Assemble and link the program using this command:
    gcc program.s, replacing program.s with the name of your program. The executable file will be called a.out. You can rename this using the mv command if you like.

    Note that using gcc is much easier (and more reliable) than using as and ld.

  4. Run the program by typing the program name at the command prompt. You can time the program by typing time a.out. A bunch of numbers are returned, but you can find out what the numbers mean if you type man -s 1 time.

Writing a Sparc program

An assembly program for the Sparc is slightly different than an assembly program for TKISEM. First, you can't use the ta instructions to do I/O. Next, the code at the beginning and end of the program is a little different. To find out what to use as a bare-bones assembly program, do this: