aboutsummaryrefslogtreecommitdiff
path: root/project/text-files/kcl.inc/kcl-flag-template-cr.inc
diff options
context:
space:
mode:
authorroot <root@dc13.lemmi>2020-07-21 10:00:46 +0200
committerroot <root@dc13.lemmi>2020-07-21 10:00:46 +0200
commit1192c4575ea7afdf38e3fa0df4587a08620af11e (patch)
tree6910a62487c282d0840d2e668aa7eb40b7c8a3fd /project/text-files/kcl.inc/kcl-flag-template-cr.inc
parent76de8a89f7c1d1b4522eb66e8f89d248e8c1781f (diff)
SZS v2.18a
Diffstat (limited to 'project/text-files/kcl.inc/kcl-flag-template-cr.inc')
-rw-r--r--project/text-files/kcl.inc/kcl-flag-template-cr.inc48
1 files changed, 48 insertions, 0 deletions
diff --git a/project/text-files/kcl.inc/kcl-flag-template-cr.inc b/project/text-files/kcl.inc/kcl-flag-template-cr.inc
new file mode 100644
index 0000000..8394619
--- /dev/null
+++ b/project/text-files/kcl.inc/kcl-flag-template-cr.inc
@@ -0,0 +1,48 @@
+
+##############################################################################
+##### All behind a '#' on the same line is a comment and ignored. #####
+##### See https://szs.wiimm.de/doc/kcl/flagfile for more details. #####
+##############################################################################
+# function f()
+
+# First, we define a flag function named f().
+# This allows us to define type and variant as 2 values.
+
+@function f # (type,variant)
+ @return $1 & 0x1f | $2 << 5
+@endfunction
+
+##############################################################################
+# function a()
+
+# Here we define function a() to support the flag variant type A.
+# For details see http://wiimm.de/r/ctw/KCL_flag
+
+@function a # (type,w,x,y,z)
+ @return $1 & 0x1f # type (5 bits)
+ > | ( $2 & 7 ) << 13 # W (3 bits)
+ > | ( $3 & 3 ) << 11 # X (2 bits)
+ > | ( $4 & 7 ) << 8 # Y (3 bits)
+ > | ( $5 & 7 ) << 5 # Z (3 bits)
+@endfunction
+
+##############################################################################
+# function i()
+
+# The function i() supports fall boundaries.
+
+@function i # (type,z,index)
+ @return $1 & 0x1f # type (5 bits)
+ > | ( $2 & 7 ) << 5 # Z (3 bits)
+ > | ( $3 & 0xff ) << 8 # index (8 bits)
+@endfunction
+
+##############################################################################
+# table
+
+#-----------------------------------------------------------------------------
+# group_name = flag_or_expression
+# = f(type,variant)
+# = a(type,w,x,y,z)
+# = i(type,z,index)
+#-----------------------------------------------------------------------------