Skip to content

NanoSDK

Cryptid edited this page Apr 7, 2026 · 58 revisions

NanoSDK Documentation


📝 Introduction

NanoSDK is the software that allows you to create MicroOS applications locally using the NanoCode App built into every stock MicroOS installation. In this guide, you'll learn about different commands, basic and advanced logic, compiling, and optimizations.

⌨️ Syntax Conventions

  • COMMAND [parameter] Full Name
  • Number Padding: All number parameters must be at least 3 characters long (e.g., 005).
  • Line Limits: Each line is limited to 36 characters.

Important

Currently due to the current design of the on-screen keyboard, each line is limited to 36 characters. Working around this limitation is explained in Advanced Logic.

Warning

When writing code in a virtual machine, avoid using ~ and § as they will make your project save and compile incorrectly.


📋 Basic Commands

Basic commands are the bare-bone features of NanoSDK, often required for the app to function.

DAN [name]

  • Full Name: Define Application Name
  • Description: Defines the application name listed in the library and title bar, has to be put in the first line.
  • Version: 2026.1

DAI [asset name]

  • Full Name: Define Application Icon
  • Description: Defines the application icon displayed in the library, has to be put in the second line. In case of not having an icon asset the name can be set to default in order to use the default MicroOS application icon.
  • Version: 2026.1

ASM [name]

  • Full Name: Application Submenu
  • Description: Defines the application submenu. An app cannot function without the submenu being defined in the third line.
  • Version: 2026.1

TXP [x position]

  • Full Name: Title X Position
  • Description: Defined the application title x position. An app cannot function without the title x position being defined in the fourth line.
  • Version: 2026.1

PRN [string]

  • Full Name: Print
  • Description: Displays a pop up window with the inputted string.
  • Version: 2026.1

END [error]

  • Full Name: End
  • Description: Force closes the application. An optional error message can be added.
  • Version: 2026.1

🧠 Basic Logic

Basic logic mostly revolves around the IFB and LOP systems.

IFB var [variable name] [comparison type] [comparison value]

  • Full Name: If Bracket Variable
  • Description: Triggers code if the variable condition is met (eql, mor, les, moe, loe).
  • Version: 2026.1

IFB btn [button] [button state]

  • Full Name: If Bracket Button
  • Description: Runs code based on button state (btna, btnb, dpdl, dpdr, dpdu, dpdd). States include dwn and ndn.
  • Version: 2026.1

IFB spr [variable] [comparison type] [comparison value]

  • Full Name: If Bracket Sprite
  • Description: Similar to IFB var but checks sprite data: psx, psy, psz, vsb. Includes tch for touch detection.
  • Version: 2026.1

IFB end

  • Full Name: If bracket end
  • Description: Defines the end of the If Bracket.
  • Version: 2026.1

LOP [number]

  • Full Name: Loop
  • Description: Beginning of a loop. Set to a number or inf for infinite.
  • Version: 2026.1

LOP EXT

  • Full Name: Loop Exit
  • Description: Escapes the loop it is currently in.
  • Version: 2026.1

LOP end

  • Full Name: Loop End
  • Description: Closes off the loop.
  • Version: 2026.1

🧮 Variables

Variables let you store information for later reuse.

DVR [variable name] [value]

  • Full Name: Define Variable
  • Description: Defines a new variable. With the option to include a value.
  • Version: 2026.3

SVR [variable name] [new value]

  • Full Name: Set Variable
  • Description: Sets the variables value.
  • Version: 2026.3

VRM [variable name] [operation] [number]

  • Full Name: Variable Math
  • Description: Performs a mathematical operation on a variable and sets the variable to the result. Supported operations are add, sub, mul and div.
  • Version: 2026.3

🚀 Advanced Logic

Tools to bypass hardware limitations and create complex behaviors.

[string]:BLW

  • Full Name: Below
  • Description: Allows writing longer commands/strings by extending to the line below (works around the 36-character limit).
  • Version: 2026.1

LOP :BLW

  • Full Name: Loop Below
  • Description: Allows adding an IFB parameter to a loop to keep it running until the condition is met.
  • Version: 2026.1

WHN [action] [type] [value] [additional]

  • Full Name: When
  • Description: Triggers whenever the requirement is met. Identical to IFB logic.
  • Version: 2026.1

WHN end

  • Full Name: When End
  • Description: Closes off the When Bracket.
  • Version: 2026.1

IFB els

  • Full Name: IF Bracket Else
  • Description: Inserted between IFB and IFB end for code to run when the initial condition is not met.
  • Version: 2026.1

👾 Sprite Commands

  • Status: Work in progress
  • Version: 2026.1

📃 ListGUI Commands

Commands for managing list-based graphical interfaces.

CLG

  • Full Name: Create ListGUI
  • Description: Creates a blank ListGUI.
  • Version: 2026.1

LGP [X] [Y]

  • Full Name: ListGUI Position
  • Description: Defines position (0,0 top left to 160,120 bottom right).
  • Version: 2026.1

LGD [X] [Y]

  • Full Name: ListGUI Dimensions
  • Description: Defines the dimensions of a ListGUI.
  • Version: 2026.1

LGO str[Amount]

  • Full Name: ListGUI Options
  • Description: Sets the options with strings listed below the command.
  • Version: 2026.1

LGS [Index] [Value]

  • Full Name: ListGUI Set
  • Description: Sets the chosen index to the chosen value.
  • Version: 2026.1

LGV [Index] [Variable]

  • Full Name: ListGUI Value
  • Description: Sets the defined variable to the value at the chosen index.
  • Version: 2026.1

LGR [Index]

  • Full Name: ListGUI Remove
  • Description: Removes the value at the specified index.
  • Version: 2026.1

DLG

  • Full Name: Destroy ListGUI
  • Description: Deletes the ListGUI.
  • Version: 2026.1

LGH [Mode]

  • Full Name: ListGUI Highlight
  • Description: Sets highlight mode (off, auto, or a specific number).
  • Version: 2026.1

📻 Radio Commands

  • Status: Work in progress
  • Version: 2026.1

🔌 Device Management Commands

  • Status: Work in progress
  • Version: 2026.1

🎨 Assets

  • Status: Work in progress
  • Version: 2026.1

📦 Compiling

  • Version: 2026.1 Compiling a NanoSDK app is simple:
  1. Hit the Compile button in the NanoCode top bar.
  2. Enter your desired name of the app file.
  3. Find your compiled app in User Files.

⚡ Optimizations

  • Status: Work in progress
  • Version: 2026.1

📚 Examples

  • Version: 2026.1 This is an example of a simple counter app thing.
DAN Counter
DAI default
ASM zero
TXP 020
CLG
LGD 160 097
LGP 080 058
LGH auto
LGO str3
Count: 0
Add
Reset
LOP inf
IFB var ASM eql zero
WHN sel 002
ASM one
LGS 000 Count: 1
WHN end
WHN sel 003
ASM zero
LGS 000 Count: 0
WHN end
IFB els
IFB var ASM eql one
WHN sel 002
ASM two
LGS 000 Count: 2
WHN end
WHN sel 003
ASM zero
LGS 000 Count: 0
WHN end
IFB els
IFB var ASM eql two
WHN sel 002
ASM three
LGS 000 Count: 3
WHN end
WHN sel 003
ASM zero
LGS 000 Count: 0
WHN end
IFB end
IFB end
IFB end
LOP end

Clone this wiki locally