aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/samples/simple-lw-sw-ia.S
blob: d18189698b9a0ae9e03b723f96b4a8165da48560 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Directives to make interresting windows visible
#pragma qtmips show registers
#pragma qtmips show memory

.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

// Specify location to show in memory window
#pragma qtmips focus memory src_val