NBC(1)

πŸ“¦
version 1.2.1.r4 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NBC(1) β€” bestie edition πŸ’–

General Commands Manual ✨ section 1, the "just type it in the terminal" zone 🫢


🌸 NAME 🌸

nbc β€” the compiler for LEGO Mindstorms NXT, and yes she EATS πŸ‘‘


✨ SYNOPSIS ✨

nbc [options] file [options]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so first thing, this manual page is just a brief lil rundown of the nbc command, got it? it's giving "overview", not "the whole saga" πŸ’…

nbc is the program that compiles Not eXactly C (NXC) files or NeXT Byte Code (NBC) files into programs that can actually run on the standard LEGO MINDSTORMS NXT firmware β€” or on the enhanced NBC/NXC firmware, if that's your vibe πŸ”₯

the nbc compiler can either save the compiler output to a file, or upload it straight to a LEGO Mindstorms NXT for execution. main character energy either way ✨

she can also compile NXT Picture files (.ric) using the text-based RICScript language. so yes, multiple languages, one iconic compiler πŸ’…

and since nbc can compile different programming languages, it uses the file extension to figure out which kind of code it's looking at:

  • NXC programs should use the .nxc file extension 🌸
  • NBC programs should use the .nbc file extension πŸŽ€
  • RICScript programs should use the .rs file extension πŸ¦‹

no cap, the extension IS the vibe check.


πŸ‘‘ OPTIONS πŸ‘‘

  • -S=<portname> β€” specify port name (COMn or usb), resource name, or alias 🌈
  • -d β€” download program ⬇️
  • -b β€” treat input file as a binary file (don't compile it) πŸ’€
  • -q β€” quiet mode 🀫
  • -n β€” prevent the system file from being included πŸ™ˆ
  • -D=<sym>[=<value>] β€” define macro <sym> ✨
  • -x β€” decompile program πŸ”„
  • -Z[1|2] β€” turn on compiler optimizations ⚑
  • -ER=n β€” set maximum errors before aborting (0 == no limit) 😭
  • -PD=n β€” set max preprocessor recursion depth (default == 10) πŸŒ€
  • -O=<filename> β€” specify output file πŸ“
  • -E=<filename> β€” write compiler errors to <filename> πŸ“
  • -I=<path> β€” search <path> for include files πŸ”
  • -nbc=<filename> β€” save NXC intermediate NBC code to <filename> πŸ’Ύ
  • -L=<filename> β€” generate code listing to <filename> πŸ“œ
  • -Y=<filename> β€” generate symbol table to <filename> πŸ—‚οΈ
  • -w[-|+] β€” warnings off or on [default is on] ⚠️
  • -sm[-|+] β€” compiler status messages off or on [default is on] πŸ’¬
  • -EF β€” enhanced firmware πŸš€
  • -safecall β€” NXC will wrap all function calls in Acquire/Release πŸ›‘οΈ
  • -api β€” dump the API to stdout πŸ–¨οΈ
  • -v=n β€” set the targeted firmware version (default == 128, NXT 1.1 == 105) πŸ”’
  • -help β€” display command line options πŸ†˜

🫢 AUTHOR 🫢

nbc was written by John Hansen. periodt. πŸ’–

this manual page was written by Sebastian Reichel <elektranox@gmail.com>, for the Debian project (but may be used by others) 🌸


and that's the whole thing bestie, tysm for reading, ily πŸ₯Ή

September 21, 2009 🌸 NBC(1) β€” slay, go compile something iconic πŸ’…βœ¨