aboutsummaryrefslogtreecommitdiffstats
path: root/ex.format
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2021-07-06 10:26:46 +0000
committers-ol <s+removethis@s-ol.nu>2021-07-06 11:08:54 +0000
commit631f09462050c8173dacb22a83e6ef3dacc3c8a1 (patch)
tree4cbd147e158991e229ce1fc2001525078a020b83 /ex.format
parentgood helloworld example (diff)
downloadsubv-631f09462050c8173dacb22a83e6ef3dacc3c8a1.tar.gz
subv-631f09462050c8173dacb22a83e6ef3dacc3c8a1.zip
update README/ex example
Diffstat (limited to 'ex.format')
-rw-r--r--ex.format13
1 files changed, 3 insertions, 10 deletions
diff --git a/ex.format b/ex.format
index 5fb48d8..6727dd1 100644
--- a/ex.format
+++ b/ex.format
@@ -1,6 +1,6 @@
== code 0x80000000
# repeatedly print "Hi\n"
-main:
+# main:
# load 0x10010000 (UART0) into t0
37/7 05/5 10010/20
# store 0x48 (H) in UART0+0
@@ -12,12 +12,5 @@ main:
# store 0x0a (\n) in UART0+0
13/7 06/5 0/3 00/5 00a/12
23/7 00/5 2/3 05/5 06/5 00/7
-# jump back up to the top (three versions):
-# a) jal 21bit relative (with 0th bit forced to 0)
-# 6f/jal 0/rd/x0 main/off21
-# b) auipc+jalr 32bit relative (note label offset)
-17/7 07/5 main/off32/[31:12]
-67/7 00/5 0/3 07/5 main+4/off32/[11:0]
-# c) lui+jalr 32bit absolute
-# 37/lui 7/rd/t2 main/imm32
-# 67/jalr 0/subop 0/rd/x0 7/rs/t2 main/imm32
+# jump back up to the top
+6f/7 00/5 ff/8 1/1 3f2/10 1/1