Skip to content
Kyr4vexPublic

About

Testing repository / lSM = custom language like assembly i guess

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

LSM Language Interpreter

A lightweight, custom assembly-like scripting language built on Luau. but in fact its just some bullshit made on fast hand


🛠️ How to Run Code

To execute programs using this interpreter, import the module and pass your code as a string to lsm.run():

local lsm = require(path.to.lsm)

local sourceCode = [[
mov x 10
add x 5
print x
]]

lsm.run(sourceCode)

📝 Syntax & Instructions

Instruction Arguments Description
raw [register] [value] Directly saves a raw value to a register
mov [register] [value/reg] Moves a number or another register's value into a target
add / sub [register] [value/reg] Adds or subtracts a value from the target register
mul / div [register] [value/reg] Multiplies or divides the target register
testcode [target] [source] Decodes a custom pairs-of-digits string into text
print [register] Prints the value inside the register
nop None Does nothing (No Operation)

📂 Code Examples

1. Basic Math Demo

This example demonstrates moving numbers into a register and modifying them.

mov x 10
add x 5
sub x 2
mul x 3
print x

Expected Output:

39

2. Hello World (Custom Bytecode Decoding)

This example uses the built-in testcode function to translate paired numeric codes into standard characters.

raw a 161320202300312326201202
testcode b a
print b

Expected Output:

hello world!

About

Testing repository / lSM = custom language like assembly i guess

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages