Machine code: Difference between revisions

1,246 bytes removed ,  2 years ago
m (→‎{{header|Phix}}: added personal tag and a more natural way to do it.)
Line 524:
7 + 12 = 19
</pre>
 
=={{header|Lua}}==
 
{{incomplete|Lua| The text below cannot be considered a contribution that specifically addresses the task, it is rather a subjective judgement. Please either contribute code or remove and place in the talk section of this page. Regards.}}
 
Thankfully, native Lua has no such provisions. This task should probably be marked "omit from|Lua", except that the task is not explicit whether or not ''only'' native facilities may be used. The task cites the Common Lisp example as reference, which ''does'' use an external FFI library to accomplish the task, so implies that external facilities ''may'' be used. If such tactics are allowed, then the LuaJIT distribution includes FFI. Or, wrap the "test" function of the C example, and expose it to Lua as an external library - that is well within Lua's capabilities (one of Lua's strengths, actually). Or take the modified approach used in the Kotlin example - Lua can easily build the raw byte array, then pass it to an external C library to execute. Or, simply compile the C example, then call it via os.execute("cexample.exe"). No code is given, as the task is outside the scope of pure/native Lua, but it ''would'' be easy to accomplish if external support were allowed.
 
=={{header|M2000 Interpreter}}==
Anonymous user