LLC24 LiteScript Reference

LLC24 LiteScript is a custom assembly-style language designed for the LLC24 lighting controller module. This page covers the CPU/core architecture, registers, memory, instructions, operands, and full command set.

LiteScript Mission Solutions


Module Overview: LLC24

Addressing & Memory Bank Symbols

PrefixBank NameDescription
#CoreExecutable code (self-modifiable)
@MEMGeneral-purpose RAM (scratch and variables)
$I/ODevice I/O registers (inputs and outputs)
falseImmediateNo prefix: use for constants (numeric literals 0–255)
*PointerSingle-level indirect addressing into RAM

Example: MOV @IN2, @M01 moves real-time input 2 into scratch memory slot M01.

Registers / Standard Locations

Instruction Format

Ex: ADD @IN0, 10, @M04 will add 10 to input 0 and store in scratch M04.

Operands

TypeHow to WriteMeaning
Immediate 42 The literal value (0–255)
Direct Address @M01, @RED Accesses the value in RAM, input, or output location
Pointer *M05 Uses the value of RAM at M05 as the address to access

Commands / Instruction Reference

InstructionUsageDescription
MOV MOV a, b Copy value of a to b
ADD ADD a, b, c Add a + b, store result in c
SUB SUB a, b, c Subtract a - b, store result in c
MUL MUL a, b, c Multiply a * b, store result in c
DIV DIV a, b, c Divide a / b (if b != 0), store result in c
MOD MOD a, b, c a % b (modulo, if b != 0), result to c
INC INC dst, val Increment dst by val
DEC DEC dst, val Decrement dst by val
AND AND a, b, c Bitwise AND, c = a & b
OR OR a, b, c Bitwise OR, c = a | b
XOR XOR a, b, c Bitwise XOR, c = a ^ b
NOT NOT a, c Bitwise NOT,c = ~a
CLR CLR dst Set dst to 0
FLP FLP a, b Swap (flip) contents of a and b
JMP JMP n Unconditional jump to line/address n
JEQ JEQ a, b, n Jump to n if a==b
JNE JNE a, b, n Jump to n if a!=b
JGR JGR a, b, n Jump to n if a > b
Notes:

CPU & Execution Rules

Examples

Example 1: Mirror IN0 to RED

MOV @IN0, @RED
        

Example 2: Light blue if IN3 is greater than 100

JGR @IN3, 100, 03
CLR @BLU
JMP 04
MOV 255, @BLU
        

Example 3: Toggle white light on rising edge of IN1

SUB @IN1, @M00, @M01
JGR @M01, 0, 05
JMP 07
MOV 255, @WHT
MOV @IN1, @M00
        

Special: Memory & Pointers

Error/Notes

Reserved Words & Registers

  • Inputs: @IN0, @IN1, @IN2, @IN3
  • Outputs: @RED, @GRN, @BLU, @WHT
  • Scratch: @M00@M23
  • Pointers: *M00*M23
  • Constants: 0–255
  • Line/Jump Targets: Line numbers or addresses
  • Bank Prefixes: (none), @, *, #

Resources

More official docs and community solutions:
nightbyte.net/llc24

LiteScript and LLC24 are products of Nightbyte Lighting. © Nightbyte, all rights reserved.