Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # File: demo1.asm
- # Written by: Yeukhon Wong, October 31, 2011
- # Version: 1
- #
- # This file contains MIPS assembly instructions. Tested under Windows 7 and QtSpim 9.14
- #
- # This is a demo file for CSC 342, under the teaching of Professor Gertner.
- #
- .data
- str1: .asciiz "A"
- str2: .asciiz "1"
- myInt:
- .word 42 # allocate an integer word: 42
- myChar:
- .word 'Q' # allocate a char word
- .text
- .align 2
- .globl main
- main:
- lw $t0, myInt # load myInt into register $t0
- lw $t3, str1 # load str1 into register $t3
- lw $t4, str2 # load str2 into register $t4
- la $a0, str1 # load address str2
- la $a0, str2 # load address str1
- la $a0, str2 # load address str2
- la $a0, str1 # load address str1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement