Browse code

Added documentation for Asma helper script

Andrew Alderwick authored on 16/05/2021 08:39:40
Showing 2 changed files
... ...
@@ -1,8 +1,3 @@
1
-local band, bor, lshift, rshift
2
-do
3
-  local _obj_0 = require('bit')
4
-  band, bor, lshift, rshift = _obj_0.band, _obj_0.bor, _obj_0.lshift, _obj_0.rshift
5
-end
6 1
 local spairs
7 2
 spairs = function(t)
8 3
   local keys
... ...
@@ -1,4 +1,22 @@
1
-import band, bor, lshift, rshift from require 'bit'
1
+--
2
+-- Asma tree helper script
3
+--
4
+-- This script updates the trees at the end of projects/software/asma.usm when
5
+-- Uxn's opcode set changes or new runes (first character of tokens) are
6
+-- created, so that new changes in the C assembler can be incorporated rapidly
7
+-- into asma.
8
+--
9
+-- To run, you need Lua or LuaJIT, and just run etc/asma.lua from the top
10
+-- directory of Uxn's git repository:
11
+--
12
+--     lua etc/asma.lua
13
+--
14
+-- This file is written in MoonScript, which is a language that compiles to
15
+-- Lua, the same way as e.g. CoffeeScript compiles to JavaScript. Since
16
+-- installing MoonScript has more dependencies than Lua, the compiled
17
+-- etc/asma.lua is kept in Uxn's repository and will be kept updated as this
18
+-- file changes.
19
+--
2 20
 
3 21
 spairs = (t) ->
4 22
 	keys = [ k for k in pairs t ]