File: static-data.asm

package info (click to toggle)
riscemu 2.2.7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,036 kB
  • sloc: python: 5,669; asm: 780; sh: 28; makefile: 26
file content (20 lines) | stat: -rw-r--r-- 419 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
.data
my_data:
.word   0x11223344, 0x55667788, 0x9900aabb, 0xccddeeff

.text
main:
        // load base address into t0
        la  t0, my_data
        // begin loading words and printing them
        lw  a0, 0(t0)
        print.uhex a0
        lw  a0, 4(t0)
        print.uhex a0
        lw  a0, 8(t0)
        print.uhex a0
        lw  a0, 12(t0)
        print.uhex a0
        // exit
        li  a7, 93
        ecall