aboutsummaryrefslogtreecommitdiffstats
path: root/examples/ex.subv
blob: a65643e26ff098fa9971971cdfe3cf10b8fc7a68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
== code 0x80400000
# repeatedly print "Hi\n"
main:
  # load 0x10000000 (UART0) into t0
  37/lui 5/rd/t0 10000/imm20
  # store 0x48 (H) in UART0+0
  13/opi 0/subop/add 6/rd/t1 0/rs/x0 48/imm12
  23/store 0/width/byte 5/rs/t0 0/off12 6/rs/t1
  # store 0x69 (i) in UART0+0
  13/opi 0/subop/add 6/rd/t1 0/rs/x0 69/imm12
  23/store 0/width/byte 5/rs/t0 0/off12 6/rs/t1
  # store 0x0a (\n) in UART0+0
  13/opi 0/subop/add 6/rd/t1 0/rs/x0 0a/imm12
  23/store 0/width/byte 5/rs/t0 0/off12 6/rs/t1
  # jump back up to the top
  6f/jal 0/rd/x0 main/off21