aboutsummaryrefslogtreecommitdiff
path: root/ops/li/gen_li.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ops/li/gen_li.sh')
-rwxr-xr-xops/li/gen_li.sh39
1 files changed, 37 insertions, 2 deletions
diff --git a/ops/li/gen_li.sh b/ops/li/gen_li.sh
index a844de4..0e01841 100755
--- a/ops/li/gen_li.sh
+++ b/ops/li/gen_li.sh
@@ -1,10 +1,45 @@
#!/bin/sh
+# load special into o register
for i in $(seq 0 255); do
- filename=li"$i".c
+ opname=lio$i
+ filename="$opname".c
echo "#include \"../common.h\"\n" \
- "DEFINE_OP(li$i) {" \
+ "DEFINE_OP($opname) {" \
"UNUSED(o);" \
"NEXT_OP(sp, a, x, y, $i);" \
"}" > "$filename"
done
+
+# load special into a register
+for i in $(seq 0 255); do
+ opname=lia$i
+ filename="$opname".c
+ echo "#include \"../common.h\"\n" \
+ "DEFINE_OP($opname) {" \
+ "UNUSED(a);" \
+ "NEXT_OP(sp, $i, x, y, o);" \
+ "}" > "$filename"
+done
+
+# load special into x register
+for i in $(seq 0 255); do
+ opname=lix$i
+ filename="$opname".c
+ echo "#include \"../common.h\"\n" \
+ "DEFINE_OP($opname) {" \
+ "UNUSED(x);" \
+ "NEXT_OP(sp, a, $i, y, o);" \
+ "}" > "$filename"
+done
+
+# load special into y register
+for i in $(seq 0 255); do
+ opname=liy$i
+ filename="$opname".c
+ echo "#include \"../common.h\"\n" \
+ "DEFINE_OP($opname) {" \
+ "UNUSED(y);" \
+ "NEXT_OP(sp, a, x, $i, o);" \
+ "}" > "$filename"
+done