<< Assembly Unit Home
TAL = True Assembly Language
MAL = MIPS Assembly Language
|
Input to Registers
There are 5 ways to input values into registers
- Use the Simulator -> Set Value... menu. screenshot
- Load registers using TAL (or machine) instructions addi or ori. Example.
- Load addresses using MAL (or psuedo) instruction la, and data using li. Example.
- Use the assembler to load data symbolically. Example.
- 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
- Use the Simulator -> Set Value... menu. Enter an address instead of a register. screenshot
- 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).
|