<< Assembly Unit Home

TAL = True Assembly Language
MAL = MIPS Assembly Language

Valid HTML 4.01!

Input to Registers

There are 5 ways to input values into registers

  1. Use the Simulator -> Set Value... menu. screenshot
  2. Load registers using TAL (or machine) instructions addi or ori. Example.
  3. Load addresses using MAL (or psuedo) instruction la, and data using li. Example.
  4. Use the assembler to load data symbolically. Example.
  5. Use a system call to input data at run time.

Method 1 quickly becomes tedious. With methods 2-4 you need to change your program file to use different inputs. Check Appendix A of your textbook for method 5.


Input to Memory

Use one of the following to input values into memory

  1. Use the Simulator -> Set Value... menu. Enter an address instead of a register. screenshot
  2. Use the assembler directive .data to load data symbolically in the DATA area. See this example (details in Appendix A on the CD-ROM with your textbook).