aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/samples/simple-lw-sw-ia.S
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_gui/samples/simple-lw-sw-ia.S')
-rw-r--r--qtmips_gui/samples/simple-lw-sw-ia.S26
1 files changed, 26 insertions, 0 deletions
diff --git a/qtmips_gui/samples/simple-lw-sw-ia.S b/qtmips_gui/samples/simple-lw-sw-ia.S
new file mode 100644
index 0000000..d2c3f2c
--- /dev/null
+++ b/qtmips_gui/samples/simple-lw-sw-ia.S
@@ -0,0 +1,26 @@
+.globl _start
+.set noat
+.set noreorder
+
+.text
+
+_start:
+loop:
+ // load the word from absolute address
+ lw $2, 0x2000($0)
+ // store the word to absolute address
+ sw $2, 0x2004($0)
+
+ // stop execution wait for debugger/user
+ //break
+ // ensure that continuation does not
+ // interpret random data
+ beq $0, $0, loop
+ nop
+
+.data
+
+src_val:
+ .word 0x12345678
+dst_val:
+ .word 0